home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / readin.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  81KB  |  2,737 lines

  1. /* readin.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
  12.         nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
  13.         junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
  14.         numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
  15.         iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
  16.         lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
  17.         nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
  18.         irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
  19.         lvntmp;
  20. } tabinf_;
  21.  
  22. #define tabinf_1 tabinf_
  23.  
  24. struct {
  25.     doublereal atime, aprog[3], adate, atitle[10], defl, defw, defad, defas, 
  26.         rstats[50];
  27.     integer iwidth, lwidth, nopage;
  28. } miscel_;
  29.  
  30. #define miscel_1 miscel_
  31.  
  32. struct {
  33.     doublereal achar, afield[15], oldlin[15];
  34.     integer kntrc, kntlim;
  35. } line_;
  36.  
  37. #define line_1 line_
  38.  
  39. struct {
  40.     integer locate[50], jelcnt[50], nunods, ncnods, numnod, nstop, nut, nlt, 
  41.         nxtrm, ndist, ntlin, ibr, numvs, numalt, numcyc;
  42. } cirdat_;
  43.  
  44. #define cirdat_1 cirdat_
  45.  
  46. struct {
  47.     doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
  48.         sfactr;
  49.     integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
  50.         itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
  51. } status_;
  52.  
  53. #define status_1 status_
  54.  
  55. struct {
  56.     integer iprnta, iprntl, iprntm, iprntn, iprnto, limtim, limpts, lvlcod, 
  57.         lvltim, itl1, itl2, itl3, itl4, itl5, itl6, igoof, nogo, keof;
  58. } flags_;
  59.  
  60. #define flags_1 flags_
  61.  
  62. struct {
  63.     doublereal twopi, xlog2, xlog10, root2, rad, boltz, charge, ctok, gmin, 
  64.         reltol, abstol, vntol, trtol, chgtol, eps0, epssil, epsox, pivtol,
  65.          pivrel;
  66. } knstnt_;
  67.  
  68. #define knstnt_1 knstnt_
  69.  
  70. struct {
  71.     doublereal tcstar[2], tcstop[2], tcincr[2];
  72.     integer icvflg, itcelm[2], kssop, kinel, kidin, kovar, kidout;
  73. } dc_;
  74.  
  75. #define dc_1 dc_
  76.  
  77. struct {
  78.     doublereal fstart, fstop, fincr, skw2, refprl, spw2;
  79.     integer jacflg, idfreq, inoise, nosprt, nosout, nosin, idist, idprt;
  80. } ac_;
  81.  
  82. #define ac_1 ac_
  83.  
  84. struct {
  85.     doublereal tstep, tstop, tstart, delmax, tdmax, forfre;
  86.     integer jtrflg;
  87. } tran_;
  88.  
  89. #define tran_1 tran_
  90.  
  91. struct {
  92.     doublereal xincr, string[15], xstart, yvar[8];
  93.     integer itab[8], itype[8], ilogy[8], npoint, numout, kntr, numdgt;
  94. } outinf_;
  95.  
  96. #define outinf_1 outinf_
  97.  
  98. struct {
  99.     integer maxtim, itime, icost;
  100. } cje_;
  101.  
  102. #define cje_1 cje_
  103.  
  104. struct {
  105.     integer idebug[20];
  106. } debug_;
  107.  
  108. #define debug_1 debug_
  109.  
  110. struct {
  111.     doublereal value[200000];
  112. } blank_;
  113.  
  114. #define blank_1 blank_
  115.  
  116. /* Table of constant values */
  117.  
  118. static integer c__20 = 20;
  119. static integer c__10 = 10;
  120. static integer c__0 = 0;
  121. static integer c__1 = 1;
  122. static integer c_n1 = -1;
  123. static integer c__72 = 72;
  124. static integer c__15 = 15;
  125. static integer c__50 = 50;
  126. static integer c__2 = 2;
  127. static integer c__7 = 7;
  128. static integer c__3 = 3;
  129. static integer c__6 = 6;
  130.  
  131. /* spice version 2g.6  sccsid=readin.ma 3/22/83 */
  132. /*<       subroutine readin >*/
  133. /* Subroutine */ int readin_()
  134. {
  135.     /* Initialized data */
  136.  
  137.     static struct {
  138.     char e_1[8];
  139.     doublereal e_2;
  140.     } equiv_105 = { {'s', 'i', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  141.  
  142. #define alssi (*(doublereal *)&equiv_105)
  143.  
  144.     static struct {
  145.     char e_1[8];
  146.     doublereal e_2;
  147.     } equiv_106 = { {'o', 'f', 'f', ' ', ' ', ' ', ' ', ' '}, 0. };
  148.  
  149. #define alsoff (*(doublereal *)&equiv_106)
  150.  
  151.     static struct {
  152.     char e_1[8];
  153.     doublereal e_2;
  154.     } equiv_107 = { {'d', 'c', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  155.  
  156. #define alsdc (*(doublereal *)&equiv_107)
  157.  
  158.     static struct {
  159.     char e_1[8];
  160.     doublereal e_2;
  161.     } equiv_108 = { {'p', 'w', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  162.  
  163. #define alspw (*(doublereal *)&equiv_108)
  164.  
  165.     static struct {
  166.     char e_1[8];
  167.     doublereal e_2;
  168.     } equiv_109 = { {'z', '0', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  169.  
  170. #define alsz0 (*(doublereal *)&equiv_109)
  171.  
  172.     static struct {
  173.     char e_1[8];
  174.     doublereal e_2;
  175.     } equiv_110 = { {'z', 'o', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  176.  
  177. #define alszo (*(doublereal *)&equiv_110)
  178.  
  179.     static struct {
  180.     char e_1[8];
  181.     doublereal e_2;
  182.     } equiv_111 = { {'n', 'l', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  183.  
  184. #define alsnl (*(doublereal *)&equiv_111)
  185.  
  186.     static struct {
  187.     char e_1[8];
  188.     doublereal e_2;
  189.     } equiv_112 = { {'f', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  190.  
  191. #define alsf (*(doublereal *)&equiv_112)
  192.  
  193.     static struct {
  194.     char e_1[8];
  195.     doublereal e_2;
  196.     } equiv_113 = { {'t', 'd', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  197.  
  198. #define alstd (*(doublereal *)&equiv_113)
  199.  
  200.     static struct {
  201.     char e_1[8];
  202.     doublereal e_2;
  203.     } equiv_114 = { {'l', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  204.  
  205. #define alsl (*(doublereal *)&equiv_114)
  206.  
  207.     static struct {
  208.     char e_1[8];
  209.     doublereal e_2;
  210.     } equiv_115 = { {'w', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  211.  
  212. #define alsw (*(doublereal *)&equiv_115)
  213.  
  214.     static struct {
  215.     char e_1[8];
  216.     doublereal e_2;
  217.     } equiv_116 = { {'a', 's', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  218.  
  219. #define alsas (*(doublereal *)&equiv_116)
  220.  
  221.     static struct {
  222.     char e_1[8];
  223.     doublereal e_2;
  224.     } equiv_117 = { {'a', 'd', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  225.  
  226. #define alsad (*(doublereal *)&equiv_117)
  227.  
  228.     static struct {
  229.     char e_1[8];
  230.     doublereal e_2;
  231.     } equiv_118 = { {'p', 'd', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  232.  
  233. #define alspd (*(doublereal *)&equiv_118)
  234.  
  235.     static struct {
  236.     char e_1[8];
  237.     doublereal e_2;
  238.     } equiv_119 = { {'p', 's', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  239.  
  240. #define alsps (*(doublereal *)&equiv_119)
  241.  
  242.     static struct {
  243.     char e_1[8];
  244.     doublereal e_2;
  245.     } equiv_120 = { {'n', 'r', 'd', ' ', ' ', ' ', ' ', ' '}, 0. };
  246.  
  247. #define alsrds (*(doublereal *)&equiv_120)
  248.  
  249.     static struct {
  250.     char e_1[8];
  251.     doublereal e_2;
  252.     } equiv_121 = { {'n', 'r', 's', ' ', ' ', ' ', ' ', ' '}, 0. };
  253.  
  254. #define alsrss (*(doublereal *)&equiv_121)
  255.  
  256.     static struct {
  257.     char e_1[8];
  258.     doublereal e_2;
  259.     } equiv_122 = { {'x', 'q', 'c', ' ', ' ', ' ', ' ', ' '}, 0. };
  260.  
  261. #define alsxqc (*(doublereal *)&equiv_122)
  262.  
  263.     static struct {
  264.     char e_1[8];
  265.     doublereal e_2;
  266.     } equiv_123 = { {'z', 'x', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  267.  
  268. #define alszx (*(doublereal *)&equiv_123)
  269.  
  270.     static struct {
  271.     char e_1[8];
  272.     doublereal e_2;
  273.     } equiv_124 = { {'s', 'f', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  274.  
  275. #define alssf (*(doublereal *)&equiv_124)
  276.  
  277.     static struct {
  278.     char e_1[32];
  279.     doublereal e_2;
  280.     } equiv_125 = { {'i', 'n', 'p', 'u', 't', ' ', 'l', 'i', 's', 't', 'i'
  281.         , 'n', 'g', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 
  282.         ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  283.  
  284. #define titinp ((doublereal *)&equiv_125)
  285.  
  286.     static struct {
  287.     char e_1[8];
  288.     doublereal e_2;
  289.     } equiv_126 = { {'p', 'o', 'l', 'y', ' ', ' ', ' ', ' '}, 0. };
  290.  
  291. #define apoly (*(doublereal *)&equiv_126)
  292.  
  293.     static struct {
  294.     char e_1[8];
  295.     doublereal e_2;
  296.     } equiv_127 = { {'i', 'c', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  297.  
  298. #define aic (*(doublereal *)&equiv_127)
  299.  
  300.     static struct {
  301.     char e_1[8];
  302.     doublereal e_2;
  303.     } equiv_128 = { {'a', 'r', 'e', 'a', ' ', ' ', ' ', ' '}, 0. };
  304.  
  305. #define area (*(doublereal *)&equiv_128)
  306.  
  307.     static struct {
  308.     char e_1[8];
  309.     doublereal e_2;
  310.     } equiv_129 = { {'t', 'c', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  311.  
  312. #define alstc (*(doublereal *)&equiv_129)
  313.  
  314.     static integer numic[4] = { 1,2,2,3 };
  315.     static struct {
  316.     char e_1[8];
  317.     doublereal e_2;
  318.     } equiv_130 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  319.  
  320. #define ablnk (*(doublereal *)&equiv_130)
  321.  
  322.     static struct {
  323.     char e_1[8];
  324.     doublereal e_2;
  325.     } equiv_131 = { {'.', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  326.  
  327. #define aper (*(doublereal *)&equiv_131)
  328.  
  329.     static integer nnods[20] = { 2,2,2,0,2,2,2,2,2,2,2,3,3,4,4,4,4,0,0,0 };
  330.     static integer ntnods[20] = { 2,2,2,0,2,2,2,2,2,2,3,6,5,6,4,4,4,0,0,0 };
  331.     static integer l2nod[24] = { 8,12,14,6,13,14,13,14,11,6,16,36,25,33,6,6,
  332.         33,0,3,3,3,3,3,3 };
  333.     static integer naidc = 22;
  334.     static struct {
  335.     char e_1[56];
  336.     doublereal e_2;
  337.     } equiv_132 = { {'d', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'p', 'n'
  338.         , ' ', ' ', ' ', ' ', ' ', 'p', 'n', 'p', ' ', ' ', ' ', ' ', 
  339.         ' ', 'n', 'j', 'f', ' ', ' ', ' ', ' ', ' ', 'p', 'j', 'f', 
  340.         ' ', ' ', ' ', ' ', ' ', 'n', 'm', 'o', 's', ' ', ' ', ' ', 
  341.         ' ', 'p', 'm', 'o', 's', ' ', ' ', ' ', ' '}, 0. };
  342.  
  343. #define aidm ((doublereal *)&equiv_132)
  344.  
  345.     static integer ipolar[7] = { 0,1,-1,1,-1,1,-1 };
  346.     static integer modid[7] = { 1,2,2,3,3,4,4 };
  347.     static integer ipar[5] = { 0,14,60,72,114 };
  348.     static struct {
  349.     char e_1[912];
  350.     doublereal e_2;
  351.     } equiv_133 = { {'i', 's', ' ', ' ', ' ', ' ', ' ', ' ', 'r', 's', ' '
  352.         , ' ', ' ', ' ', ' ', ' ', 'n', ' ', ' ', ' ', ' ', ' ', ' ', 
  353.         ' ', 't', 't', ' ', ' ', ' ', ' ', ' ', ' ', 'c', 'j', 'o', 
  354.         ' ', ' ', ' ', ' ', ' ', 'v', 'j', ' ', ' ', ' ', ' ', ' ', 
  355.         ' ', 'm', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'e', 'g', ' ', 
  356.         ' ', ' ', ' ', ' ', ' ', 'x', 't', 'i', ' ', ' ', ' ', ' ', 
  357.         ' ', 'k', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 'a', 'f', ' ', 
  358.         ' ', ' ', ' ', ' ', ' ', 'f', 'c', ' ', ' ', ' ', ' ', ' ', 
  359.         ' ', 'b', 'v', ' ', ' ', ' ', ' ', ' ', ' ', 'i', 'b', 'v', 
  360.         ' ', ' ', ' ', ' ', ' ', 'i', 's', ' ', ' ', ' ', ' ', ' ', 
  361.         ' ', 'b', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'f', ' ', 
  362.         ' ', ' ', ' ', ' ', ' ', 'v', 'a', 'f', ' ', ' ', ' ', ' ', 
  363.         ' ', 'i', 'k', 'f', ' ', ' ', ' ', ' ', ' ', 'i', 's', 'e', 
  364.         ' ', ' ', ' ', ' ', ' ', 'n', 'e', ' ', ' ', ' ', ' ', ' ', 
  365.         ' ', 'b', 'r', ' ', ' ', ' ', ' ', ' ', ' ', 'n', 'r', ' ', 
  366.         ' ', ' ', ' ', ' ', ' ', 'v', 'a', 'r', ' ', ' ', ' ', ' ', 
  367.         ' ', 'i', 'k', 'r', ' ', ' ', ' ', ' ', ' ', 'i', 's', 'c', 
  368.         ' ', ' ', ' ', ' ', ' ', 'n', 'c', ' ', ' ', ' ', ' ', ' ', 
  369.         ' ', '0', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '0', ' ', ' ', 
  370.         ' ', ' ', ' ', ' ', ' ', 'r', 'b', ' ', ' ', ' ', ' ', ' ', 
  371.         ' ', 'i', 'r', 'b', ' ', ' ', ' ', ' ', ' ', 'r', 'b', 'm', 
  372.         ' ', ' ', ' ', ' ', ' ', 'r', 'e', ' ', ' ', ' ', ' ', ' ', 
  373.         ' ', 'r', 'c', ' ', ' ', ' ', ' ', ' ', ' ', 'c', 'j', 'e', 
  374.         ' ', ' ', ' ', ' ', ' ', 'v', 'j', 'e', ' ', ' ', ' ', ' ', 
  375.         ' ', 'm', 'j', 'e', ' ', ' ', ' ', ' ', ' ', 't', 'f', ' ', 
  376.         ' ', ' ', ' ', ' ', ' ', 'x', 't', 'f', ' ', ' ', ' ', ' ', 
  377.         ' ', 'v', 't', 'f', ' ', ' ', ' ', ' ', ' ', 'i', 't', 'f', 
  378.         ' ', ' ', ' ', ' ', ' ', 'p', 't', 'f', ' ', ' ', ' ', ' ', 
  379.         ' ', 'c', 'j', 'c', ' ', ' ', ' ', ' ', ' ', 'v', 'j', 'c', 
  380.         ' ', ' ', ' ', ' ', ' ', 'm', 'j', 'c', ' ', ' ', ' ', ' ', 
  381.         ' ', 'x', 'c', 'j', 'c', ' ', ' ', ' ', ' ', 't', 'r', ' ', 
  382.         ' ', ' ', ' ', ' ', ' ', '0', ' ', ' ', ' ', ' ', ' ', ' ', 
  383.         ' ', '0', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '0', ' ', ' ', 
  384.         ' ', ' ', ' ', ' ', ' ', '0', ' ', ' ', ' ', ' ', ' ', ' ', 
  385.         ' ', 'c', 'j', 's', ' ', ' ', ' ', ' ', ' ', 'v', 'j', 's', 
  386.         ' ', ' ', ' ', ' ', ' ', 'm', 'j', 's', ' ', ' ', ' ', ' ', 
  387.         ' ', 'x', 't', 'b', ' ', ' ', ' ', ' ', ' ', 'e', 'g', ' ', 
  388.         ' ', ' ', ' ', ' ', ' ', 'x', 't', 'i', ' ', ' ', ' ', ' ', 
  389.         ' ', 'k', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 'a', 'f', ' ', 
  390.         ' ', ' ', ' ', ' ', ' ', 'f', 'c', ' ', ' ', ' ', ' ', ' ', 
  391.         ' ', 'v', 't', 'o', ' ', ' ', ' ', ' ', ' ', 'b', 'e', 't', 
  392.         'a', ' ', ' ', ' ', ' ', 'l', 'a', 'm', 'b', 'd', 'a', ' ', 
  393.         ' ', 'r', 'd', ' ', ' ', ' ', ' ', ' ', ' ', 'r', 's', ' ', 
  394.         ' ', ' ', ' ', ' ', ' ', 'c', 'g', 's', ' ', ' ', ' ', ' ', 
  395.         ' ', 'c', 'g', 'd', ' ', ' ', ' ', ' ', ' ', 'p', 'b', ' ', 
  396.         ' ', ' ', ' ', ' ', ' ', 'i', 's', ' ', ' ', ' ', ' ', ' ', 
  397.         ' ', 'k', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 'a', 'f', ' ', 
  398.         ' ', ' ', ' ', ' ', ' ', 'f', 'c', ' ', ' ', ' ', ' ', ' ', 
  399.         ' ', 'l', 'e', 'v', 'e', 'l', ' ', ' ', ' ', 'v', 't', 'o', 
  400.         ' ', ' ', ' ', ' ', ' ', 'k', 'p', ' ', ' ', ' ', ' ', ' ', 
  401.         ' ', 'g', 'a', 'm', 'm', 'a', ' ', ' ', ' ', 'p', 'h', 'i', 
  402.         ' ', ' ', ' ', ' ', ' ', 'l', 'a', 'm', 'b', 'd', 'a', ' ', 
  403.         ' ', 'r', 'd', ' ', ' ', ' ', ' ', ' ', ' ', 'r', 's', ' ', 
  404.         ' ', ' ', ' ', ' ', ' ', 'c', 'b', 'd', ' ', ' ', ' ', ' ', 
  405.         ' ', 'c', 'b', 's', ' ', ' ', ' ', ' ', ' ', 'i', 's', ' ', 
  406.         ' ', ' ', ' ', ' ', ' ', 'p', 'b', ' ', ' ', ' ', ' ', ' ', 
  407.         ' ', 'c', 'g', 's', 'o', ' ', ' ', ' ', ' ', 'c', 'g', 'd', 
  408.         'o', ' ', ' ', ' ', ' ', 'c', 'g', 'b', 'o', ' ', ' ', ' ', 
  409.         ' ', 'r', 's', 'h', ' ', ' ', ' ', ' ', ' ', 'c', 'j', ' ', 
  410.         ' ', ' ', ' ', ' ', ' ', 'm', 'j', ' ', ' ', ' ', ' ', ' ', 
  411.         ' ', 'c', 'j', 's', 'w', ' ', ' ', ' ', ' ', 'm', 'j', 's', 
  412.         'w', ' ', ' ', ' ', ' ', 'j', 's', ' ', ' ', ' ', ' ', ' ', 
  413.         ' ', 't', 'o', 'x', ' ', ' ', ' ', ' ', ' ', 'n', 's', 'u', 
  414.         'b', ' ', ' ', ' ', ' ', 'n', 's', 's', ' ', ' ', ' ', ' ', 
  415.         ' ', 'n', 'f', 's', ' ', ' ', ' ', ' ', ' ', 't', 'p', 'g', 
  416.         ' ', ' ', ' ', ' ', ' ', 'x', 'j', ' ', ' ', ' ', ' ', ' ', 
  417.         ' ', 'l', 'd', ' ', ' ', ' ', ' ', ' ', ' ', 'u', 'o', ' ', 
  418.         ' ', ' ', ' ', ' ', ' ', 'u', 'c', 'r', 'i', 't', ' ', ' ', 
  419.         ' ', 'u', 'e', 'x', 'p', ' ', ' ', ' ', ' ', 'u', 't', 'r', 
  420.         'a', ' ', ' ', ' ', ' ', 'v', 'm', 'a', 'x', ' ', ' ', ' ', 
  421.         ' ', 'n', 'e', 'f', 'f', ' ', ' ', ' ', ' ', 'x', 'q', 'c', 
  422.         ' ', ' ', ' ', ' ', ' ', 'k', 'f', ' ', ' ', ' ', ' ', ' ', 
  423.         ' ', 'a', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 'f', 'c', ' ', 
  424.         ' ', ' ', ' ', ' ', ' ', 'd', 'e', 'l', 't', 'a', ' ', ' ', 
  425.         ' ', 't', 'h', 'e', 't', 'a', ' ', ' ', ' ', 'e', 't', 'a', 
  426.         ' ', ' ', ' ', ' ', ' ', 'k', 'a', 'p', 'p', 'a', ' ', ' ', 
  427.         ' '}, 0. };
  428.  
  429. #define ampar ((doublereal *)&equiv_133)
  430.  
  431.     static struct {
  432.     char e_1[176];
  433.     doublereal e_2;
  434.     } equiv_134 = { {'a', 'c', ' ', ' ', ' ', ' ', ' ', ' ', 'd', 'c', ' '
  435.         , ' ', ' ', ' ', ' ', ' ', 'd', 'i', 's', 't', 'o', 'r', 't', 
  436.         'i', 'e', 'n', 'd', ' ', ' ', ' ', ' ', ' ', 'e', 'n', 'd', 
  437.         's', ' ', ' ', ' ', ' ', 'f', 'o', 'u', 'r', 'i', 'e', 'r', 
  438.         ' ', 'm', 'o', 'd', 'e', 'l', ' ', ' ', ' ', 'n', 'o', 'i', 
  439.         's', 'e', ' ', ' ', ' ', 'o', 'p', ' ', ' ', ' ', ' ', ' ', 
  440.         ' ', 'o', 'p', 't', 'i', 'o', 'n', 's', ' ', 'p', 'l', 'o', 
  441.         't', ' ', ' ', ' ', ' ', 'p', 'r', 'i', 'n', 't', ' ', ' ', 
  442.         ' ', 's', 'u', 'b', 'c', 'k', 't', ' ', ' ', 's', 'e', 'n', 
  443.         's', 'i', 't', 'i', 'v', 't', 'r', 'a', 'n', 's', 'i', 'e', 
  444.         'n', 't', 'f', ' ', ' ', ' ', ' ', ' ', ' ', 't', 'e', 'm', 
  445.         'p', 'e', 'r', 'a', 't', 'w', 'i', 'd', 't', 'h', ' ', ' ', 
  446.         ' ', 'n', 'o', 'd', 'e', 's', 'e', 't', ' ', 'i', 'c', ' ', 
  447.         ' ', ' ', ' ', ' ', ' ', ':', 'd', 'e', 'b', 'u', 'g', ':', 
  448.         ' ', 'a', 'l', 't', 'e', 'r', ' ', ' ', ' '}, 0. };
  449.  
  450. #define aidc ((doublereal *)&equiv_134)
  451.  
  452.     static struct {
  453.     char e_1[136];
  454.     doublereal e_2;
  455.     char e_3[8];
  456.     doublereal e_4;
  457.     } equiv_135 = { {'r', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'c', ' ', ' '
  458.         , ' ', ' ', ' ', ' ', ' ', 'l', ' ', ' ', ' ', ' ', ' ', ' ', 
  459.         ' ', 'k', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'g', ' ', ' ', 
  460.         ' ', ' ', ' ', ' ', ' ', 'e', ' ', ' ', ' ', ' ', ' ', ' ', 
  461.         ' ', 'f', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'h', ' ', ' ', 
  462.         ' ', ' ', ' ', ' ', ' ', 'v', ' ', ' ', ' ', ' ', ' ', ' ', 
  463.         ' ', 'i', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'd', ' ', ' ', 
  464.         ' ', ' ', ' ', ' ', ' ', 'q', ' ', ' ', ' ', ' ', ' ', ' ', 
  465.         ' ', 'j', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'm', ' ', ' ', 
  466.         ' ', ' ', ' ', ' ', ' ', 's', ' ', ' ', ' ', ' ', ' ', ' ', 
  467.         ' ', 'y', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 't', ' ', ' ', 
  468.         ' ', ' ', ' ', ' ', ' '}, 0., {'x', ' ', ' ', ' ', ' ', ' ', 
  469.         ' ', ' '}, 0. };
  470.  
  471. #define aide ((doublereal *)&equiv_135)
  472.  
  473.     static struct {
  474.     char e_1[8];
  475.     doublereal e_2;
  476.     } equiv_136 = { {'a', 'c', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  477.  
  478. #define alsac (*(doublereal *)&equiv_136)
  479.  
  480.     static struct {
  481.     char e_1[8];
  482.     doublereal e_2;
  483.     } equiv_137 = { {'p', 'u', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  484.  
  485. #define alspu (*(doublereal *)&equiv_137)
  486.  
  487.     static struct {
  488.     char e_1[8];
  489.     doublereal e_2;
  490.     } equiv_138 = { {'e', 'x', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  491.  
  492. #define alsex (*(doublereal *)&equiv_138)
  493.  
  494.  
  495.     /* Format strings */
  496.     static char fmt_6[] = "(\0020warning:  input line-width set to 72 column\
  497. s because\002,/1x,\002possible sequencing appears in cols 73-80\002)";
  498.     static char fmt_86[] = "(\0020warning:  above line not allowed within su\
  499. bcircuit -- \002,\002ignored\002/)";
  500.     static char fmt_91[] = "(\0020*error*:  unknown data card:  \002,a8/)";
  501.     static char fmt_96[] = "(\0020*error*:  unrecognizable data card\002/)";
  502.     static char fmt_141[] = "(\0020warning:  coefficient of coupling reset t\
  503. o 1.0d0\002/)";
  504.     static char fmt_379[] = "(\0020*error*:  z0 must be specified\002/)";
  505.     static char fmt_381[] = "(\0020*error*:  either td or f must be specifie\
  506. d\002/)";
  507.     static char fmt_391[] = "(\0020*error*:  element type not yet implemente\
  508. d\002/)";
  509.     static char fmt_401[] = 
  510.         "(\0020*error*:  negative node number found\002/)";
  511.     static char fmt_411[] = "(\0020*error*:  node numbers are missing\002/)";
  512.     static char fmt_421[] = "(\0020*error*:  value is missing or is nonposit\
  513. ive\002/)";
  514.     static char fmt_431[] = "(\0020*error*:  mutual inductance references ar\
  515. e missing\002/)";
  516.     static char fmt_441[] = "(\0020*error*:  model name is missing\002/)";
  517.     static char fmt_451[] = "(\0020*error*:  unknown source function:  \002,\
  518. a8)";
  519.     static char fmt_461[] = "(\0020*error*:  unknown parameter:  \002,a8/)";
  520.     static char fmt_471[] = "(\0020*error*:  voltage source not found on abo\
  521. ve line\002/)";
  522.     static char fmt_481[] = "(\0020*error*:  value is zero\002/)";
  523.     static char fmt_491[] = "(\0020*error*:  extra numerical data on mosfet \
  524. card\002/)";
  525.     static char fmt_651[] = "(\0020*error*:  model type is missing\002/)";
  526.     static char fmt_661[] = "(\0020*error*:  unknown model type:  \002,a8/)";
  527.     static char fmt_671[] = "(\0020*error*:  unknown model parameter:  \002,\
  528. a8,/)";
  529.     static char fmt_761[] = "(\0020*error*:  subcircuit definition duplicate\
  530. s node \002,i5,/)";
  531.     static char fmt_771[] = "(\0020*error*:  nonpositive node number found i\
  532. n subcircuit \002,\002definition\002/)";
  533.     static char fmt_781[] = "(\0020*error*:  subcircuit name missing\002/)";
  534.     static char fmt_791[] = "(\0020*error*:  subcircuit nodes missing\002/)";
  535.     static char fmt_881[] = "(\0020*error*:  unknown subcircuit name:  \002,\
  536. a8/)";
  537.     static char fmt_891[] = "(\0020warning:  no subcircuit definition known \
  538. -- line ignored\002/)";
  539.     static char fmt_991[] = "(\0020*error*:  subcircuit name missing\002/)";
  540.     static char fmt_5001[] = "(\0020*error*:  .ends  card missing\002/)";
  541.  
  542.     /* System generated locals */
  543.     integer i_1, i_2;
  544.  
  545.     /* Builtin functions */
  546.     integer s_wsfe(), e_wsfe(), do_fio();
  547.  
  548.     /* Local variables */
  549.     extern /* Subroutine */ int card_();
  550.     static doublereal anam;
  551.     static integer ifld;
  552.     extern /* Subroutine */ int find_();
  553.     static integer ltab;
  554.     static doublereal aval;
  555.     static integer ndim, nmat;
  556.     extern /* Subroutine */ int move_();
  557.     static integer locv, iknt, lnod, loct, ibit, locm, ipol, node, irel;
  558.     extern /* Subroutine */ int getm4_(), getm8_(), copy8_(), zero4_(), 
  559.         zero8_();
  560.     static integer i;
  561.     static doublereal t1;
  562.     extern /* Subroutine */ int title_();
  563.     static integer istop, ispot, icloc;
  564.     static doublereal tfreq;
  565.     static integer jtype, nopar;
  566.     extern doublereal alias_();
  567.     static doublereal anams, t2;
  568.     static integer id;
  569.     static doublereal xk;
  570. #define nodplc ((integer *)&blank_1)
  571. #define cvalue ((complex *)&blank_1)
  572.     extern /* Subroutine */ int second_(), getlin_(), keysrc_(), runcon_();
  573.     static integer loc;
  574.     extern /* Subroutine */ int extmem_(), extnam_();
  575.     static integer nssnod, maxknt;
  576.     static doublereal xnl;
  577.     extern /* Subroutine */ int relmem_(), clrmem_();
  578.  
  579.     /* Fortran I/O blocks */
  580.     static cilist io__47 = { 0, 0, 0, fmt_6, 0 };
  581.     static cilist io__50 = { 0, 0, 0, fmt_86, 0 };
  582.     static cilist io__51 = { 0, 0, 0, fmt_91, 0 };
  583.     static cilist io__52 = { 0, 0, 0, fmt_96, 0 };
  584.     static cilist io__61 = { 0, 0, 0, fmt_141, 0 };
  585.     static cilist io__74 = { 0, 0, 0, fmt_379, 0 };
  586.     static cilist io__75 = { 0, 0, 0, fmt_381, 0 };
  587.     static cilist io__76 = { 0, 0, 0, fmt_391, 0 };
  588.     static cilist io__77 = { 0, 0, 0, fmt_401, 0 };
  589.     static cilist io__78 = { 0, 0, 0, fmt_411, 0 };
  590.     static cilist io__79 = { 0, 0, 0, fmt_421, 0 };
  591.     static cilist io__80 = { 0, 0, 0, fmt_431, 0 };
  592.     static cilist io__81 = { 0, 0, 0, fmt_441, 0 };
  593.     static cilist io__82 = { 0, 0, 0, fmt_451, 0 };
  594.     static cilist io__83 = { 0, 0, 0, fmt_461, 0 };
  595.     static cilist io__84 = { 0, 0, 0, fmt_471, 0 };
  596.     static cilist io__85 = { 0, 0, 0, fmt_481, 0 };
  597.     static cilist io__86 = { 0, 0, 0, fmt_491, 0 };
  598.     static cilist io__90 = { 0, 0, 0, fmt_651, 0 };
  599.     static cilist io__91 = { 0, 0, 0, fmt_661, 0 };
  600.     static cilist io__92 = { 0, 0, 0, fmt_671, 0 };
  601.     static cilist io__94 = { 0, 0, 0, fmt_761, 0 };
  602.     static cilist io__95 = { 0, 0, 0, fmt_771, 0 };
  603.     static cilist io__96 = { 0, 0, 0, fmt_781, 0 };
  604.     static cilist io__97 = { 0, 0, 0, fmt_791, 0 };
  605.     static cilist io__100 = { 0, 0, 0, fmt_881, 0 };
  606.     static cilist io__101 = { 0, 0, 0, fmt_891, 0 };
  607.     static cilist io__102 = { 0, 0, 0, fmt_991, 0 };
  608.     static cilist io__103 = { 0, 0, 0, fmt_5001, 0 };
  609.  
  610.  
  611. /*<       implicit double precision (a-h,o-z) >*/
  612.  
  613.  
  614. /*     this routine drives the input processing of spice.  element cards 
  615. */
  616. /* and device models are handled by this routine. */
  617.  
  618. /* spice version 2g.6  sccsid=tabinf 3/15/83 */
  619. /*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
  620. /*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
  621. /*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
  622. /*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
  623. /*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
  624. /*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
  625. /*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
  626. /*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
  627. /* spice version 2g.6  sccsid=miscel 3/15/83 */
  628. /*<       common /miscel/ atime,aprog(3),adate,atitle(10),defl,defw,defad, >*/
  629. /*<      1  defas,rstats(50),iwidth,lwidth,nopage >*/
  630. /* spice version 2g.6  sccsid=line 3/15/83 */
  631. /*<       common /line/ achar,afield(15),oldlin(15),kntrc,kntlim >*/
  632. /* spice version 2g.6  sccsid=cirdat 3/15/83 */
  633. /*<       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop, >*/
  634. /*<      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc >*/
  635. /* spice version 2g.6  sccsid=status 3/15/83 */
  636. /*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
  637. /*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
  638. /*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
  639. /* spice version 2g.6  sccsid=flags 3/15/83 */
  640. /*<       common /flags/ iprnta,iprntl,iprntm,iprntn,iprnto,limtim,limpts, >*/
  641. /*<      1   lvlcod,lvltim,itl1,itl2,itl3,itl4,itl5,itl6,igoof,nogo,keof >*/
  642. /* spice version 2g.6  sccsid=knstnt 3/15/83 */
  643. /*<       common /knstnt/ twopi,xlog2,xlog10,root2,rad,boltz,charge,ctok, >*/
  644. /*<      1   gmin,reltol,abstol,vntol,trtol,chgtol,eps0,epssil,epsox, >*/
  645. /*<      2   pivtol,pivrel >*/
  646. /* spice version 2g.6  sccsid=dc 3/15/83 */
  647. /*<       common /dc/ tcstar(2),tcstop(2),tcincr(2),icvflg,itcelm(2),kssop, >*/
  648. /*<      1   kinel,kidin,kovar,kidout >*/
  649. /* spice version 2g.6  sccsid=ac 3/15/83 */
  650. /*<       common /ac/ fstart,fstop,fincr,skw2,refprl,spw2,jacflg,idfreq, >*/
  651. /*<      1   inoise,nosprt,nosout,nosin,idist,idprt >*/
  652. /* spice version 2g.6  sccsid=tran 3/15/83 */
  653. /*<       common /tran/ tstep,tstop,tstart,delmax,tdmax,forfre,jtrflg >*/
  654. /* spice version 2g.6  sccsid=outinf 3/15/83 */
  655. /*<       common /outinf/ xincr,string(15),xstart,yvar(8),itab(8),itype(8), >*/
  656. /*<      1   ilogy(8),npoint,numout,kntr,numdgt >*/
  657. /* spice version 2g.6  sccsid=cje 3/15/83 */
  658. /*<       common /cje/ maxtim,itime,icost >*/
  659. /* spice version 2g.6  sccsid=debug 3/15/83 */
  660. /*<       common/debug/ idebug(20) >*/
  661. /* spice version 2g.6  sccsid=blank 3/15/83 */
  662. /*<       common /blank/ value(200000) >*/
  663. /*<       integer nodplc(64) >*/
  664. /*<       complex cvalue(32) >*/
  665. /*<       equivalence (value(1),nodplc(1),cvalue(1)) >*/
  666.  
  667. /*  control card identifiers */
  668.  
  669. /*<       dimension aide(20),nnods(20),ntnods(20),l2nod(24) >*/
  670. /*<       dimension numic(4) >*/
  671. /*<       dimension aidm(7),ipolar(7),modid(7),ipar(5),ampar(115) >*/
  672. /*<       dimension titinp(4) >*/
  673. /*<       dimension aidc(22) >*/
  674. /*<       data titinp / 8hinput li, 8hsting   , 8h        , 8h         / >*/
  675. /*<       data naidc / 22 / >*/
  676. /*<       data aidc / 8hac      , 8hdc      , 8hdistorti, 8hend     , >*/
  677. /*<      1            8hends    , 8hfourier , 8hmodel   , 8hnoise   , >*/
  678. /*<      2            8hop      , 8hoptions , 8hplot    , 8hprint   , >*/
  679. /*<      3            8hsubckt  , 8hsensitiv, 8htransien, 8htf      , >*/
  680. /*<      4            8htemperat, 8hwidth   , 8hnodeset , 8hic      , >*/
  681. /*<      5            8h:debug: , 8halter   / >*/
  682.  
  683. /*  element card identifiers, keywords, and information */
  684.  
  685. /*<       data aide / 1hr,1hc,1hl,1hk,1hg,1he,1hf,1hh,1hv,1hi,1hd,1hq,1hj, >*/
  686. /*<      1   1hm,1hs,1hy,1ht,0.0d0,1hx,0.0d0 / >*/
  687. /*<       data alsac,alspu,alsex,alssi /2hac,2hpu,2hex,2hsi/ >*/
  688. /*<       data alsoff,alsdc,alspw / 3hoff,2hdc,3hpw  / >*/
  689. /*<       data alsz0,alszo,alsnl,alsf,alstd / 2hz0,2hzo,2hnl,1hf,2htd / >*/
  690. /*<       data alsl,alsw,alsas,alsad,alspd,alsps,alsrds,alsrss,alsxqc >*/
  691. /*<      1   /1hl,1hw,2has,2had,2hpd,2hps,3hnrd,3hnrs,3hxqc/ >*/
  692. /*<       data alszx /2hzx/ >*/
  693. /*<       data alssf / 4hsf   / >*/
  694. /*<       data apoly, aic, area / 4hpoly, 2hic, 4harea / >*/
  695. /*<       data alstc / 2htc / >*/
  696. /*<       data numic / 1, 2, 2, 3 / >*/
  697. /*<       data ablnk, aper / 1h , 1h. / >*/
  698. /*<       data nnods / 2,2,2,0,2,2,2,2,2,2,2,3,3,4,4,4,4,0,0,0 / >*/
  699. /*<       data ntnods / 2,2,2,0,2,2,2,2,2,2,3,6,5,6,4,4,4,0,0,0 / >*/
  700. /*<       data l2nod / 8,12,14, 6,13,14,13,14,11, 6, >*/
  701. /*<      1            16,36,25,33, 6, 6,33, 0, 3, 3, >*/
  702. /*<      2             3, 3, 3, 3 / >*/
  703.  
  704. /*  model card keywords */
  705.  
  706. /*<       data aidm /1hd,3hnpn,3hpnp,3hnjf,3hpjf,4hnmos,4hpmos/ >*/
  707. /*<       data ipolar /0,1,-1,1,-1,1,-1/ >*/
  708. /*<       data modid /1,2,2,3,3,4,4/ >*/
  709. /*<       data ipar / 0, 14, 60, 72, 114/ >*/
  710. /*<       data ampar / >*/
  711. /*<      1   6his    ,6hrs    ,6hn     ,6htt    ,6hcjo   ,6hvj    ,6hm     , >*/
  712. /*<      2   6heg    ,6hxti   ,6hkf    ,6haf    ,6hfc    ,6hbv    ,6hibv   , >*/
  713. /*<      1   6his    ,6hbf    ,6hnf    ,6hvaf   ,6hikf   ,6hise   ,6hne    , >*/
  714. /*<      2   6hbr    ,6hnr    ,6hvar   ,6hikr   ,6hisc   ,6hnc    ,6h0     , >*/
  715. /*<      3   6h0     ,6hrb    ,6hirb   ,6hrbm   ,6hre    ,6hrc    ,6hcje   , >*/
  716. /*<      4   6hvje   ,6hmje   ,6htf    ,6hxtf   ,6hvtf   ,6hitf   ,6hptf   , >*/
  717. /*<      5   6hcjc   ,6hvjc   ,6hmjc   ,6hxcjc  ,6htr    ,6h0     ,6h0     , >*/
  718. /*<      6   6h0     ,6h0     ,6hcjs   ,6hvjs   ,6hmjs   ,6hxtb   ,6heg    , >*/
  719. /*<      7   6hxti   ,6hkf    ,6haf    ,6hfc    , >*/
  720. /*<      1   6hvto   ,6hbeta  ,6hlambda,6hrd    ,6hrs    ,6hcgs   ,6hcgd   , >*/
  721. /*<      2   6hpb    ,6his    ,6hkf    ,6haf    ,6hfc    , >*/
  722. /*<      1   6hlevel ,6hvto   ,6hkp    ,6hgamma ,6hphi   ,6hlambda,6hrd    , >*/
  723. /*<      2   6hrs    ,6hcbd   ,6hcbs   ,6his    ,6hpb    ,6hcgso  ,6hcgdo  , >*/
  724. /*<      3   6hcgbo  ,6hrsh   ,6hcj    ,6hmj    ,6hcjsw  ,6hmjsw  ,6hjs    , >*/
  725. /*<      4   6htox   ,6hnsub  ,6hnss   ,6hnfs   ,6htpg   ,6hxj    ,6hld    , >*/
  726. /*<      5   6huo    ,6hucrit ,6huexp  ,6hutra  ,6hvmax  ,6hneff  ,6hxqc   , >*/
  727. /*<      6   6hkf    ,6haf    ,6hfc    ,6hdelta ,6htheta ,6heta   ,6hkappa , >*/
  728. /*<      7   0.0d0   / >*/
  729.  
  730. /*  initialize variables */
  731.  
  732. /*<       call second(t1) >*/
  733.     second_(&t1);
  734. /*<       call zero4(idebug,20) >*/
  735.     zero4_(debug_1.idebug, &c__20);
  736. /*<       call getlin >*/
  737.     getlin_();
  738. /*<       if (keof.ne.0) go to 6000 >*/
  739.     if (flags_1.keof != 0) {
  740.     goto L6000;
  741.     }
  742. /*<       call copy8(afield,atitle,10) >*/
  743.     copy8_(line_1.afield, miscel_1.atitle, &c__10);
  744. /*<       call getm4(ielmnt,0) >*/
  745.     getm4_(&tabinf_1.ielmnt, &c__0);
  746. /*<       call getm8(itemps,1) >*/
  747.     getm8_(&tabinf_1.itemps, &c__1);
  748. /*<       value(itemps+1)=27.0d0 >*/
  749.     blank_1.value[tabinf_1.itemps] = 27.;
  750. /*<       itemno=1 >*/
  751.     status_1.itemno = 1;
  752. /*<       nopage=0 >*/
  753.     miscel_1.nopage = 0;
  754. /*<       call title(-1,72,1,titinp) >*/
  755.     title_(&c_n1, &c__72, &c__1, titinp);
  756. /*<       iwidth=80 >*/
  757.     miscel_1.iwidth = 80;
  758. /*<       do 5 i=1,8 >*/
  759.     for (i = 1; i <= 8; ++i) {
  760. /*<       achar=ablnk >*/
  761.     line_1.achar = ablnk;
  762. /*<       call move(achar,1,atitle(10),i,1) >*/
  763.     move_(&line_1.achar, &c__1, &miscel_1.atitle[9], &i, &c__1);
  764. /*<       if(achar.eq.ablnk) go to 8 >*/
  765.     if (line_1.achar == ablnk) {
  766.         goto L8;
  767.     }
  768. /*<     5 continue >*/
  769. /* L5: */
  770.     }
  771. /*<       write(iofile,6) >*/
  772.     io__47.ciunit = status_1.iofile;
  773.     s_wsfe(&io__47);
  774.     e_wsfe();
  775. /*<     6 format('0warning:  input line-width set to 72 columns because',/ >*/
  776. /*<      11x,'possible sequencing appears in cols 73-80') >*/
  777. /*<       iwidth=72 >*/
  778.     miscel_1.iwidth = 72;
  779. /*<     8 do 10 i=1,15 >*/
  780. L8:
  781.     for (i = 1; i <= 15; ++i) {
  782. /*<       afield(i)=ablnk >*/
  783.     line_1.afield[i - 1] = ablnk;
  784. /*<    10 continue >*/
  785. /* L10: */
  786.     }
  787. /*<       call copy8(afield,oldlin,15) >*/
  788.     copy8_(line_1.afield, line_1.oldlin, &c__15);
  789. /*<       call getm4(isbckt,0) >*/
  790.     getm4_(&tabinf_1.isbckt, &c__0);
  791. /*<       nsbckt=0 >*/
  792.     tabinf_1.nsbckt = 0;
  793. /*<       call getm8(iunsat,0) >*/
  794.     getm8_(&tabinf_1.iunsat, &c__0);
  795. /*<       nunsat=0 >*/
  796.     tabinf_1.nunsat = 0;
  797. /*<       numalt=0 >*/
  798.     cirdat_1.numalt = 0;
  799. /*<       numcyc=0 >*/
  800.     cirdat_1.numcyc = 0;
  801. /*<       lwidth=132 >*/
  802.     miscel_1.lwidth = 132;
  803. /*<       iprnta=0 >*/
  804.     flags_1.iprnta = 0;
  805. /*<       iprntl=0 >*/
  806.     flags_1.iprntl = 0;
  807. /*<       iprntm=1 >*/
  808.     flags_1.iprntm = 1;
  809. /*<       iprntn=0 >*/
  810.     flags_1.iprntn = 0;
  811. /*<       iprnto=0 >*/
  812.     flags_1.iprnto = 0;
  813. /*<       gmin=1.0d-12 >*/
  814.     knstnt_1.gmin = 1e-12;
  815. /*<       pivtol=1.0d-13 >*/
  816.     knstnt_1.pivtol = 1e-13;
  817. /*<       pivrel=1.0d-3 >*/
  818.     knstnt_1.pivrel = .001;
  819. /*<       reltol=0.001d0 >*/
  820.     knstnt_1.reltol = .001;
  821. /*<       abstol=1.0d-12 >*/
  822.     knstnt_1.abstol = 1e-12;
  823. /*<       vntol=1.0d-6 >*/
  824.     knstnt_1.vntol = 1e-6;
  825. /*<       trtol=7.0d0 >*/
  826.     knstnt_1.trtol = 7.;
  827. /*<       chgtol=1.0d-14 >*/
  828.     knstnt_1.chgtol = 1e-14;
  829. /*<       defl=1.0d-4 >*/
  830.     miscel_1.defl = 1e-4;
  831. /*<       defw=1.0d-4 >*/
  832.     miscel_1.defw = 1e-4;
  833. /*<       defad=0.0d0 >*/
  834.     miscel_1.defad = 0.;
  835. /*<       defas=0.0d0 >*/
  836.     miscel_1.defas = 0.;
  837. /*<       numdgt=4 >*/
  838.     outinf_1.numdgt = 4;
  839. /*<       numtem=1 >*/
  840.     tabinf_1.numtem = 1;
  841. /*<       itl1=100 >*/
  842.     flags_1.itl1 = 100;
  843. /*<       itl2=50 >*/
  844.     flags_1.itl2 = 50;
  845. /*<       itl3=4 >*/
  846.     flags_1.itl3 = 4;
  847. /*<       itl4=10 >*/
  848.     flags_1.itl4 = 10;
  849. /*<       itl5=5000 >*/
  850.     flags_1.itl5 = 5000;
  851. /*<       itl6=0 >*/
  852.     flags_1.itl6 = 0;
  853. /*<       limtim=2 >*/
  854.     flags_1.limtim = 2;
  855. /*<       limpts=201 >*/
  856.     flags_1.limpts = 201;
  857. /*<       lvlcod=1 >*/
  858.     flags_1.lvlcod = 1;
  859. /*<       lvltim=2 >*/
  860.     flags_1.lvltim = 2;
  861. /*<       method=1 >*/
  862.     status_1.method = 1;
  863. /*<       xmu=0.5d0 >*/
  864.     status_1.xmu = .5;
  865. /*<       maxord=2 >*/
  866.     status_1.maxord = 2;
  867. /*<       nosolv=0 >*/
  868.     status_1.nosolv = 0;
  869. /*<       icvflg=0 >*/
  870.     dc_1.icvflg = 0;
  871. /*<       itcelm(2)=0 >*/
  872.     dc_1.itcelm[1] = 0;
  873. /*<       idist=0 >*/
  874.     ac_1.idist = 0;
  875. /*<       idprt=0 >*/
  876.     ac_1.idprt = 0;
  877. /*<       inoise=0 >*/
  878.     ac_1.inoise = 0;
  879. /*<       jacflg=0 >*/
  880.     ac_1.jacflg = 0;
  881. /*<       jtrflg=0 >*/
  882.     tran_1.jtrflg = 0;
  883. /*<       call getm4(ifour,0) >*/
  884.     getm4_(&tabinf_1.ifour, &c__0);
  885. /*<       nfour=0 >*/
  886.     tabinf_1.nfour = 0;
  887. /*<       call getm4(nsnod,0) >*/
  888.     getm4_(&tabinf_1.nsnod, &c__0);
  889. /*<       call getm8(nsval,0) >*/
  890.     getm8_(&tabinf_1.nsval, &c__0);
  891. /*<       call getm4(icnod,0) >*/
  892.     getm4_(&tabinf_1.icnod, &c__0);
  893. /*<       call getm8(icval,0) >*/
  894.     getm8_(&tabinf_1.icval, &c__0);
  895. /*<       kinel=0 >*/
  896.     dc_1.kinel = 0;
  897. /*<       kovar=0 >*/
  898.     dc_1.kovar = 0;
  899. /*<       kssop=0 >*/
  900.     dc_1.kssop = 0;
  901. /*<       nosprt=0 >*/
  902.     ac_1.nosprt = 0;
  903. /*<       nsens=0 >*/
  904.     tabinf_1.nsens = 0;
  905. /*<       call getm4(isens,0) >*/
  906.     getm4_(&tabinf_1.isens, &c__0);
  907. /*<       numnod=0 >*/
  908.     cirdat_1.numnod = 0;
  909. /*<       ncnods=0 >*/
  910.     cirdat_1.ncnods = 0;
  911. /*<       nunods=0 >*/
  912.     cirdat_1.nunods = 0;
  913. /*<       call zero4(locate,50) >*/
  914.     zero4_(cirdat_1.locate, &c__50);
  915. /*<       call zero4(jelcnt,50) >*/
  916.     zero4_(cirdat_1.jelcnt, &c__50);
  917. /*<       insize=50 >*/
  918.     tabinf_1.insize = 50;
  919. /*<       call getm8(ifield,insize) >*/
  920.     getm8_(&tabinf_1.ifield, &tabinf_1.insize);
  921. /*<       call getm4(icode,insize) >*/
  922.     getm4_(&tabinf_1.icode, &tabinf_1.insize);
  923. /*<       call getm8(idelim,insize) >*/
  924.     getm8_(&tabinf_1.idelim, &tabinf_1.insize);
  925. /*<       call getm4(icolum,insize) >*/
  926.     getm4_(&tabinf_1.icolum, &tabinf_1.insize);
  927. /*<       go to 50 >*/
  928.     goto L50;
  929.  
  930. /*  error entry */
  931.  
  932. /*<    40 nogo=1 >*/
  933. L40:
  934.     flags_1.nogo = 1;
  935.  
  936. /*  read and decode next card in input deck */
  937.  
  938. /*<    50 igoof=0 >*/
  939. L50:
  940.     flags_1.igoof = 0;
  941. /*<       call card >*/
  942.     card_();
  943. /*<       if (keof.ne.0) go to 5000 >*/
  944.     if (flags_1.keof != 0) {
  945.     goto L5000;
  946.     }
  947. /*<       if (igoof.ne.0) go to 40 >*/
  948.     if (flags_1.igoof != 0) {
  949.     goto L40;
  950.     }
  951. /*<       if (nodplc(icode+1).eq.0) go to 95 >*/
  952.     if (nodplc[tabinf_1.icode] == 0) {
  953.     goto L95;
  954.     }
  955. /*<       anam=value(ifield+1) >*/
  956.     anam = blank_1.value[tabinf_1.ifield];
  957. /*<       call move(anam,2,ablnk,1,7) >*/
  958.     move_(&anam, &c__2, &ablnk, &c__1, &c__7);
  959. /*<       if (anam.ne.aper) go to 70 >*/
  960.     if (anam != aper) {
  961.     goto L70;
  962.     }
  963. /*<       call move(anam,1,value(ifield+1),2,7) >*/
  964.     move_(&anam, &c__1, &blank_1.value[tabinf_1.ifield], &c__2, &c__7);
  965. /*<       call keysrc(aidc,naidc,anam,id) >*/
  966.     keysrc_(aidc, &naidc, &anam, &id);
  967. /*<       if (id.le.0) go to 90 >*/
  968.     if (id <= 0) {
  969.     goto L90;
  970.     }
  971. /*<       if (id.eq.4) go to 5000 >*/
  972.     if (id == 4) {
  973.     goto L5000;
  974.     }
  975. /*<       if (id.eq.5) go to 800 >*/
  976.     if (id == 5) {
  977.     goto L800;
  978.     }
  979. /*<       if (id.eq.7) go to 500 >*/
  980.     if (id == 7) {
  981.     goto L500;
  982.     }
  983. /*<       if (id.eq.13) go to 700 >*/
  984.     if (id == 13) {
  985.     goto L700;
  986.     }
  987. /*<       if (id.eq.22) numalt=numalt+1 >*/
  988.     if (id == 22) {
  989.     ++cirdat_1.numalt;
  990.     }
  991. /*<       if (nsbckt.ge.1) go to 85 >*/
  992.     if (tabinf_1.nsbckt >= 1) {
  993.     goto L85;
  994.     }
  995. /*<       if (id.ne.22) call runcon(id) >*/
  996.     if (id != 22) {
  997.     runcon_(&id);
  998.     }
  999. /*<       if (igoof.ne.0) go to 40 >*/
  1000.     if (flags_1.igoof != 0) {
  1001.     goto L40;
  1002.     }
  1003. /*<       go to 50 >*/
  1004.     goto L50;
  1005. /*<    70 id=0 >*/
  1006. L70:
  1007.     id = 0;
  1008. /*<    80 id=id+1 >*/
  1009. L80:
  1010.     ++id;
  1011. /*<       if (id.gt.20) go to 90 >*/
  1012.     if (id > 20) {
  1013.     goto L90;
  1014.     }
  1015. /*<       if (anam.eq.aide(id)) go to 100 >*/
  1016.     if (anam == aide[id - 1]) {
  1017.     goto L100;
  1018.     }
  1019. /*<       go to 80 >*/
  1020.     goto L80;
  1021. /*<    85 write (iofile,86) >*/
  1022. L85:
  1023.     io__50.ciunit = status_1.iofile;
  1024.     s_wsfe(&io__50);
  1025.     e_wsfe();
  1026. /*<    86 format('0warning:  above line not allowed within subcircuit -- ', >*/
  1027. /*<      1   'ignored'/) >*/
  1028. /*<       go to 50 >*/
  1029.     goto L50;
  1030. /*<    90 write (iofile,91) value(ifield+1) >*/
  1031. L90:
  1032.     io__51.ciunit = status_1.iofile;
  1033.     s_wsfe(&io__51);
  1034.     do_fio(&c__1, (char *)&blank_1.value[tabinf_1.ifield], (ftnlen)sizeof(
  1035.         doublereal));
  1036.     e_wsfe();
  1037. /*<    91 format('0*error*:  unknown data card:  ',a8/) >*/
  1038. /*<       go to 40 >*/
  1039.     goto L40;
  1040. /*<    95 write (iofile,96) >*/
  1041. L95:
  1042.     io__52.ciunit = status_1.iofile;
  1043.     s_wsfe(&io__52);
  1044.     e_wsfe();
  1045. /*<    96 format('0*error*:  unrecognizable data card'/) >*/
  1046. /*<       go to 40 >*/
  1047.     goto L40;
  1048.  
  1049. /*  element and device cards */
  1050.  
  1051. /*<   100 call find(value(ifield+1),id,loc,1) >*/
  1052. L100:
  1053.     find_(&blank_1.value[tabinf_1.ifield], &id, &loc, &c__1);
  1054. /*<       locv=nodplc(loc+1) >*/
  1055.     locv = nodplc[loc];
  1056. /*<       if (id.eq.4) go to 140 >*/
  1057.     if (id == 4) {
  1058.     goto L140;
  1059.     }
  1060. /*<       if (id.eq.19) go to 900 >*/
  1061.     if (id == 19) {
  1062.     goto L900;
  1063.     }
  1064. /*<       istop=nnods(id)+1 >*/
  1065.     istop = nnods[id - 1] + 1;
  1066. /*<       if (nodplc(loc+l2nod(id)).ne.0) go to 113 >*/
  1067.     if (nodplc[loc + l2nod[id - 1] - 1] != 0) {
  1068.     goto L113;
  1069.     }
  1070. /*<       do 110 i=2,istop >*/
  1071.     i_1 = istop;
  1072.     for (i = 2; i <= i_1; ++i) {
  1073. /*<       if (nodplc(icode+i).ne.0) go to 410 >*/
  1074.     if (nodplc[tabinf_1.icode + i - 1] != 0) {
  1075.         goto L410;
  1076.     }
  1077. /*<       if (value(ifield+i).lt.0.0d0) go to 400 >*/
  1078.     if (blank_1.value[tabinf_1.ifield + i - 1] < 0.) {
  1079.         goto L400;
  1080.     }
  1081. /*<   110 nodplc(loc+i)=value(ifield+i) >*/
  1082. /* L110: */
  1083.     nodplc[loc + i - 1] = (integer) blank_1.value[tabinf_1.ifield + i - 1]
  1084.         ;
  1085.     }
  1086. /*<       go to 115 >*/
  1087.     goto L115;
  1088. /*<   113 do 114 i=2,istop >*/
  1089. L113:
  1090.     i_1 = istop;
  1091.     for (i = 2; i <= i_1; ++i) {
  1092. /*<       nodplc(loc+i)=0 >*/
  1093.     nodplc[loc + i - 1] = 0;
  1094. /*<   114 continue >*/
  1095. /* L114: */
  1096.     }
  1097. /*<   115 go to (120,130,130,140,150,150,180,180,200,200,300,300,300,300, >*/
  1098. /*<      1   390,390,350,390,390,390), id >*/
  1099. L115:
  1100.     switch (id) {
  1101.     case 1:  goto L120;
  1102.     case 2:  goto L130;
  1103.     case 3:  goto L130;
  1104.     case 4:  goto L140;
  1105.     case 5:  goto L150;
  1106.     case 6:  goto L150;
  1107.     case 7:  goto L180;
  1108.     case 8:  goto L180;
  1109.     case 9:  goto L200;
  1110.     case 10:  goto L200;
  1111.     case 11:  goto L300;
  1112.     case 12:  goto L300;
  1113.     case 13:  goto L300;
  1114.     case 14:  goto L300;
  1115.     case 15:  goto L390;
  1116.     case 16:  goto L390;
  1117.     case 17:  goto L350;
  1118.     case 18:  goto L390;
  1119.     case 19:  goto L390;
  1120.     case 20:  goto L390;
  1121.     }
  1122.  
  1123. /*  resistor */
  1124.  
  1125. /*<   120 if (nodplc(icode+4).ne.0) go to 420 >*/
  1126. L120:
  1127.     if (nodplc[tabinf_1.icode + 3] != 0) {
  1128.     goto L420;
  1129.     }
  1130. /*<       if (value(ifield+4).eq.0.0d0) go to 480 >*/
  1131.     if (blank_1.value[tabinf_1.ifield + 3] == 0.) {
  1132.     goto L480;
  1133.     }
  1134. /*<       value(locv+2)=value(ifield+4) >*/
  1135.     blank_1.value[locv + 1] = blank_1.value[tabinf_1.ifield + 3];
  1136. /*<       ifld=4 >*/
  1137.     ifld = 4;
  1138. /*<   122 ifld=ifld+1 >*/
  1139. L122:
  1140.     ++ifld;
  1141. /*<       if (nodplc(icode+ifld)) 50,122,124 >*/
  1142.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1143.     goto L50;
  1144.     } else if (i_1 == 0) {
  1145.     goto L122;
  1146.     } else {
  1147.     goto L124;
  1148.     }
  1149. /*<   124 anam=value(ifield+ifld) >*/
  1150. L124:
  1151.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1152. /*<       if (anam.ne.alstc) go to 460 >*/
  1153.     if (anam != alstc) {
  1154.     goto L460;
  1155.     }
  1156. /*<       ifld=ifld+1 >*/
  1157.     ++ifld;
  1158. /*<       if (nodplc(icode+ifld)) 50,126,124 >*/
  1159.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1160.     goto L50;
  1161.     } else if (i_1 == 0) {
  1162.     goto L126;
  1163.     } else {
  1164.     goto L124;
  1165.     }
  1166. /*<   126 value(locv+3)=value(ifield+ifld) >*/
  1167. L126:
  1168.     blank_1.value[locv + 2] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1169. /*<       ifld=ifld+1 >*/
  1170.     ++ifld;
  1171. /*<       if (nodplc(icode+ifld)) 50,128,124 >*/
  1172.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1173.     goto L50;
  1174.     } else if (i_1 == 0) {
  1175.     goto L128;
  1176.     } else {
  1177.     goto L124;
  1178.     }
  1179. /*<   128 value(locv+4)=value(ifield+ifld) >*/
  1180. L128:
  1181.     blank_1.value[locv + 3] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1182. /*<       go to 50 >*/
  1183.     goto L50;
  1184.  
  1185. /*  capacitor or inductor */
  1186.  
  1187. /*<   130 iknt=0 >*/
  1188. L130:
  1189.     iknt = 0;
  1190. /*<       ltab=7 >*/
  1191.     ltab = 7;
  1192. /*<       if (id.eq.3) ltab=10 >*/
  1193.     if (id == 3) {
  1194.     ltab = 10;
  1195.     }
  1196. /*<       if (nodplc(icode+4)) 420,131,132 >*/
  1197.     if ((i_1 = nodplc[tabinf_1.icode + 3]) < 0) {
  1198.     goto L420;
  1199.     } else if (i_1 == 0) {
  1200.     goto L131;
  1201.     } else {
  1202.     goto L132;
  1203.     }
  1204. /*<   131 if (value(ifield+4).le.0.0d0) go to 420 >*/
  1205. L131:
  1206.     if (blank_1.value[tabinf_1.ifield + 3] <= 0.) {
  1207.     goto L420;
  1208.     }
  1209. /*<       value(locv+1)=value(ifield+4) >*/
  1210.     blank_1.value[locv] = blank_1.value[tabinf_1.ifield + 3];
  1211. /*<       nodplc(loc+4)=1 >*/
  1212.     nodplc[loc + 3] = 1;
  1213. /*<       ifld=5 >*/
  1214.     ifld = 5;
  1215. /*<       if (nodplc(icode+ifld)) 50,420,139 >*/
  1216.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1217.     goto L50;
  1218.     } else if (i_1 == 0) {
  1219.     goto L420;
  1220.     } else {
  1221.     goto L139;
  1222.     }
  1223. /*<   132 call getm8(nodplc(loc+ltab),0) >*/
  1224. L132:
  1225.     getm8_(&nodplc[loc + ltab - 1], &c__0);
  1226. /*<       anam=value(ifield+4) >*/
  1227.     anam = blank_1.value[tabinf_1.ifield + 3];
  1228. /*<       if (anam.ne.apoly) go to 450 >*/
  1229.     if (anam != apoly) {
  1230.     goto L450;
  1231.     }
  1232. /*<       ifld=4 >*/
  1233.     ifld = 4;
  1234. /*<   134 ifld=ifld+1 >*/
  1235. L134:
  1236.     ++ifld;
  1237. /*<       if (nodplc(icode+ifld)) 50,136,138 >*/
  1238.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1239.     goto L50;
  1240.     } else if (i_1 == 0) {
  1241.     goto L136;
  1242.     } else {
  1243.     goto L138;
  1244.     }
  1245. /*<   136 call extmem(nodplc(loc+ltab),1) >*/
  1246. L136:
  1247.     extmem_(&nodplc[loc + ltab - 1], &c__1);
  1248. /*<       iknt=iknt+1 >*/
  1249.     ++iknt;
  1250. /*<       ispot=nodplc(loc+ltab)+iknt >*/
  1251.     ispot = nodplc[loc + ltab - 1] + iknt;
  1252. /*<       value(ispot)=value(ifield+ifld) >*/
  1253.     blank_1.value[ispot - 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1254. /*<       go to 134 >*/
  1255.     goto L134;
  1256. /*<   138 if (iknt.eq.0) go to 420 >*/
  1257. L138:
  1258.     if (iknt == 0) {
  1259.     goto L420;
  1260.     }
  1261. /*<   139 anam=value(ifield+ifld) >*/
  1262. L139:
  1263.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1264. /*<       if (anam.ne.aic) go to 460 >*/
  1265.     if (anam != aic) {
  1266.     goto L460;
  1267.     }
  1268. /*<       ifld=ifld+1 >*/
  1269.     ++ifld;
  1270. /*<       if (nodplc(icode+ifld).ne.0) go to 50 >*/
  1271.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  1272.     goto L50;
  1273.     }
  1274. /*<       value(locv+2)=value(ifield+ifld) >*/
  1275.     blank_1.value[locv + 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1276. /*<       go to 50 >*/
  1277.     goto L50;
  1278.  
  1279. /*  mutual inductance */
  1280.  
  1281. /*<   140 if (nodplc(icode+2).ne.1) go to 430 >*/
  1282. L140:
  1283.     if (nodplc[tabinf_1.icode + 1] != 1) {
  1284.     goto L430;
  1285.     }
  1286. /*<       anam=value(ifield+2) >*/
  1287.     anam = blank_1.value[tabinf_1.ifield + 1];
  1288. /*<       call move(anam,2,ablnk,1,7) >*/
  1289.     move_(&anam, &c__2, &ablnk, &c__1, &c__7);
  1290. /*<       if (anam.ne.aide(3)) go to 430 >*/
  1291.     if (anam != aide[2]) {
  1292.     goto L430;
  1293.     }
  1294. /*<       call extnam(value(ifield+2),nodplc(loc+2)) >*/
  1295.     extnam_(&blank_1.value[tabinf_1.ifield + 1], &nodplc[loc + 1]);
  1296. /*<       if (nodplc(icode+3).ne.1) go to 430 >*/
  1297.     if (nodplc[tabinf_1.icode + 2] != 1) {
  1298.     goto L430;
  1299.     }
  1300. /*<       anam=value(ifield+3) >*/
  1301.     anam = blank_1.value[tabinf_1.ifield + 2];
  1302. /*<       call move(anam,2,ablnk,1,7) >*/
  1303.     move_(&anam, &c__2, &ablnk, &c__1, &c__7);
  1304. /*<       if (anam.ne.aide(3)) go to 430 >*/
  1305.     if (anam != aide[2]) {
  1306.     goto L430;
  1307.     }
  1308. /*<       call extnam(value(ifield+3),nodplc(loc+3)) >*/
  1309.     extnam_(&blank_1.value[tabinf_1.ifield + 2], &nodplc[loc + 2]);
  1310. /*<       if (nodplc(icode+4).ne.0) go to 420 >*/
  1311.     if (nodplc[tabinf_1.icode + 3] != 0) {
  1312.     goto L420;
  1313.     }
  1314. /*<       xk=value(ifield+4) >*/
  1315.     xk = blank_1.value[tabinf_1.ifield + 3];
  1316. /*<       if (xk.le.0.0d0) go to 420 >*/
  1317.     if (xk <= 0.) {
  1318.     goto L420;
  1319.     }
  1320. /*<       if (xk.le.1.0d0) go to 145 >*/
  1321.     if (xk <= 1.) {
  1322.     goto L145;
  1323.     }
  1324. /*<       xk=1.0d0 >*/
  1325.     xk = 1.;
  1326. /*<       write (iofile,141) >*/
  1327.     io__61.ciunit = status_1.iofile;
  1328.     s_wsfe(&io__61);
  1329.     e_wsfe();
  1330. /*<   141 format('0warning:  coefficient of coupling reset to 1.0d0'/) >*/
  1331. /*<   145 value(locv+1)=xk >*/
  1332. L145:
  1333.     blank_1.value[locv] = xk;
  1334. /*<       go to 50 >*/
  1335.     goto L50;
  1336.  
  1337. /*  voltage controlled (nonlinear) sources */
  1338.  
  1339. /*<   150 ndim=1 >*/
  1340. L150:
  1341.     ndim = 1;
  1342. /*<       ifld=3 >*/
  1343.     ifld = 3;
  1344. /*<       if (nodplc(icode+4)) 410,156,152 >*/
  1345.     if ((i_1 = nodplc[tabinf_1.icode + 3]) < 0) {
  1346.     goto L410;
  1347.     } else if (i_1 == 0) {
  1348.     goto L156;
  1349.     } else {
  1350.     goto L152;
  1351.     }
  1352. /*<   152 anam=value(ifield+4) >*/
  1353. L152:
  1354.     anam = blank_1.value[tabinf_1.ifield + 3];
  1355. /*<       if (anam.ne.apoly) go to 450 >*/
  1356.     if (anam != apoly) {
  1357.     goto L450;
  1358.     }
  1359. /*<       if (nodplc(icode+5).ne.0) go to 420 >*/
  1360.     if (nodplc[tabinf_1.icode + 4] != 0) {
  1361.     goto L420;
  1362.     }
  1363. /*<       ndim=value(ifield+5) >*/
  1364.     ndim = (integer) blank_1.value[tabinf_1.ifield + 4];
  1365. /*<       if (ndim.le.0) go to 420 >*/
  1366.     if (ndim <= 0) {
  1367.     goto L420;
  1368.     }
  1369. /*<       ifld=5 >*/
  1370.     ifld = 5;
  1371. /*<   156 nodplc(loc+4)=ndim >*/
  1372. L156:
  1373.     nodplc[loc + 3] = ndim;
  1374. /*<       ltab=id+1 >*/
  1375.     ltab = id + 1;
  1376. /*<       nssnod=2*ndim >*/
  1377.     nssnod = ndim << 1;
  1378. /*<       nmat=4*ndim >*/
  1379.     nmat = ndim << 2;
  1380. /*<       if (id.eq.6) nmat=4+2*ndim >*/
  1381.     if (id == 6) {
  1382.     nmat = (ndim << 1) + 4;
  1383.     }
  1384. /*<       call getm4(nodplc(loc+ltab),nssnod) >*/
  1385.     getm4_(&nodplc[loc + ltab - 1], &nssnod);
  1386. /*<       call getm4(nodplc(loc+ltab+1),nmat) >*/
  1387.     getm4_(&nodplc[loc + ltab], &nmat);
  1388. /*<       call getm8(nodplc(loc+ltab+2),0) >*/
  1389.     getm8_(&nodplc[loc + ltab + 1], &c__0);
  1390. /*<       call getm8(nodplc(loc+ltab+3),ndim) >*/
  1391.     getm8_(&nodplc[loc + ltab + 2], &ndim);
  1392. /*<       call getm4(nodplc(loc+ltab+4),ndim) >*/
  1393.     getm4_(&nodplc[loc + ltab + 3], &ndim);
  1394. /*<       call getm8(nodplc(loc+ltab+5),ndim) >*/
  1395.     getm8_(&nodplc[loc + ltab + 4], &ndim);
  1396. /*<       ispot=nodplc(loc+ltab+5) >*/
  1397.     ispot = nodplc[loc + ltab + 4];
  1398. /*<       call zero8(value(ispot+1),ndim) >*/
  1399.     zero8_(&blank_1.value[ispot], &ndim);
  1400. /*<       lnod=nodplc(loc+ltab) >*/
  1401.     lnod = nodplc[loc + ltab - 1];
  1402. /*<       do 158 i=1,nssnod >*/
  1403.     i_1 = nssnod;
  1404.     for (i = 1; i <= i_1; ++i) {
  1405. /*<       ifld=ifld+1 >*/
  1406.     ++ifld;
  1407. /*<       if (nodplc(icode+ifld).ne.0) go to 410 >*/
  1408.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  1409.         goto L410;
  1410.     }
  1411. /*<       if (value(ifield+ifld).lt.0.0d0) go to 400 >*/
  1412.     if (blank_1.value[tabinf_1.ifield + ifld - 1] < 0.) {
  1413.         goto L400;
  1414.     }
  1415. /*<       nodplc(lnod+i)=value(ifield+ifld) >*/
  1416.     nodplc[lnod + i - 1] = (integer) blank_1.value[tabinf_1.ifield + ifld 
  1417.         - 1];
  1418. /*<   158 continue >*/
  1419. /* L158: */
  1420.     }
  1421. /*<   160 iknt=0 >*/
  1422. L160:
  1423.     iknt = 0;
  1424. /*<   162 ifld=ifld+1 >*/
  1425. L162:
  1426.     ++ifld;
  1427. /*<       if (nodplc(icode+ifld).ne.0) go to 164 >*/
  1428.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  1429.     goto L164;
  1430.     }
  1431. /*<       call extmem(nodplc(loc+ltab+2),1) >*/
  1432.     extmem_(&nodplc[loc + ltab + 1], &c__1);
  1433. /*<       iknt=iknt+1 >*/
  1434.     ++iknt;
  1435. /*<       ispot=nodplc(loc+ltab+2)+iknt >*/
  1436.     ispot = nodplc[loc + ltab + 1] + iknt;
  1437. /*<       value(ispot)=value(ifield+ifld) >*/
  1438.     blank_1.value[ispot - 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1439. /*<       go to 162 >*/
  1440.     goto L162;
  1441. /*<   164 if (iknt.eq.0) go to 420 >*/
  1442. L164:
  1443.     if (iknt == 0) {
  1444.     goto L420;
  1445.     }
  1446. /*<       if (nodplc(icode+ifld).ne.1) go to 170 >*/
  1447.     if (nodplc[tabinf_1.icode + ifld - 1] != 1) {
  1448.     goto L170;
  1449.     }
  1450. /*<       anam=value(ifield+ifld) >*/
  1451.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1452. /*<       if (anam.ne.aic) go to 460 >*/
  1453.     if (anam != aic) {
  1454.     goto L460;
  1455.     }
  1456. /*<       do 168 i=1,ndim >*/
  1457.     i_1 = ndim;
  1458.     for (i = 1; i <= i_1; ++i) {
  1459. /*<       ifld=ifld+1 >*/
  1460.     ++ifld;
  1461. /*<       if (nodplc(icode+ifld)) 170,166,420 >*/
  1462.     if ((i_2 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1463.         goto L170;
  1464.     } else if (i_2 == 0) {
  1465.         goto L166;
  1466.     } else {
  1467.         goto L420;
  1468.     }
  1469. /*<   166 ispot=nodplc(loc+ltab+5)+i >*/
  1470. L166:
  1471.     ispot = nodplc[loc + ltab + 4] + i;
  1472. /*<       value(ispot)=value(ifield+ifld) >*/
  1473.     blank_1.value[ispot - 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1474. /*<   168 continue >*/
  1475. /* L168: */
  1476.     }
  1477. /*<   170 if (ndim.ne.1) go to 50 >*/
  1478. L170:
  1479.     if (ndim != 1) {
  1480.     goto L50;
  1481.     }
  1482. /*<       if (iknt.ne.1) go to 50 >*/
  1483.     if (iknt != 1) {
  1484.     goto L50;
  1485.     }
  1486. /*<       call extmem(nodplc(loc+ltab+2),1) >*/
  1487.     extmem_(&nodplc[loc + ltab + 1], &c__1);
  1488. /*<       ispot=nodplc(loc+ltab+2) >*/
  1489.     ispot = nodplc[loc + ltab + 1];
  1490. /*<       value(ispot+2)=value(ispot+1) >*/
  1491.     blank_1.value[ispot + 1] = blank_1.value[ispot];
  1492. /*<       value(ispot+1)=0.0d0 >*/
  1493.     blank_1.value[ispot] = 0.;
  1494. /*<       go to 50 >*/
  1495.     goto L50;
  1496.  
  1497. /*  current controlled (nonlinear) sources */
  1498.  
  1499. /*<   180 ndim=1 >*/
  1500. L180:
  1501.     ndim = 1;
  1502. /*<       ifld=3 >*/
  1503.     ifld = 3;
  1504. /*<       if (nodplc(icode+4).ne.1) go to 470 >*/
  1505.     if (nodplc[tabinf_1.icode + 3] != 1) {
  1506.     goto L470;
  1507.     }
  1508. /*<       anam=value(ifield+4) >*/
  1509.     anam = blank_1.value[tabinf_1.ifield + 3];
  1510. /*<       if (anam.ne.apoly) go to 182 >*/
  1511.     if (anam != apoly) {
  1512.     goto L182;
  1513.     }
  1514. /*<       ifld=5 >*/
  1515.     ifld = 5;
  1516. /*<       if (nodplc(icode+5).ne.0) go to 420 >*/
  1517.     if (nodplc[tabinf_1.icode + 4] != 0) {
  1518.     goto L420;
  1519.     }
  1520. /*<       ndim=value(ifield+5) >*/
  1521.     ndim = (integer) blank_1.value[tabinf_1.ifield + 4];
  1522. /*<       if (ndim.le.0) go to 420 >*/
  1523.     if (ndim <= 0) {
  1524.     goto L420;
  1525.     }
  1526. /*<   182 nodplc(loc+4)=ndim >*/
  1527. L182:
  1528.     nodplc[loc + 3] = ndim;
  1529. /*<       ltab=id-1 >*/
  1530.     ltab = id - 1;
  1531. /*<       nmat=2*ndim >*/
  1532.     nmat = ndim << 1;
  1533. /*<       if (id.eq.8) nmat=4+ndim >*/
  1534.     if (id == 8) {
  1535.     nmat = ndim + 4;
  1536.     }
  1537. /*<       call getm4(nodplc(loc+ltab),ndim) >*/
  1538.     getm4_(&nodplc[loc + ltab - 1], &ndim);
  1539. /*<       call getm4(nodplc(loc+ltab+1),nmat) >*/
  1540.     getm4_(&nodplc[loc + ltab], &nmat);
  1541. /*<       call getm8(nodplc(loc+ltab+2),0) >*/
  1542.     getm8_(&nodplc[loc + ltab + 1], &c__0);
  1543. /*<       call getm8(nodplc(loc+ltab+3),ndim) >*/
  1544.     getm8_(&nodplc[loc + ltab + 2], &ndim);
  1545. /*<       call getm4(nodplc(loc+ltab+4),ndim) >*/
  1546.     getm4_(&nodplc[loc + ltab + 3], &ndim);
  1547. /*<       call getm8(nodplc(loc+ltab+5),ndim) >*/
  1548.     getm8_(&nodplc[loc + ltab + 4], &ndim);
  1549. /*<       ispot=nodplc(loc+ltab+5) >*/
  1550.     ispot = nodplc[loc + ltab + 4];
  1551. /*<       call zero8(value(ispot+1),ndim) >*/
  1552.     zero8_(&blank_1.value[ispot], &ndim);
  1553. /*<       do 184 i=1,ndim >*/
  1554.     i_1 = ndim;
  1555.     for (i = 1; i <= i_1; ++i) {
  1556. /*<       ifld=ifld+1 >*/
  1557.     ++ifld;
  1558. /*<       if (nodplc(icode+ifld).ne.1) go to 470 >*/
  1559.     if (nodplc[tabinf_1.icode + ifld - 1] != 1) {
  1560.         goto L470;
  1561.     }
  1562. /*<       anam=value(ifield+ifld) >*/
  1563.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1564. /*<       call move(anam,2,ablnk,1,7) >*/
  1565.     move_(&anam, &c__2, &ablnk, &c__1, &c__7);
  1566. /*<       if (anam.ne.aide(9)) go to 470 >*/
  1567.     if (anam != aide[8]) {
  1568.         goto L470;
  1569.     }
  1570. /*<       call extnam(value(ifield+ifld),loct) >*/
  1571.     extnam_(&blank_1.value[tabinf_1.ifield + ifld - 1], &loct);
  1572. /*<       ispot=nodplc(loc+ltab)+i >*/
  1573.     ispot = nodplc[loc + ltab - 1] + i;
  1574. /*<       nodplc(ispot)=loct >*/
  1575.     nodplc[ispot - 1] = loct;
  1576. /*<   184 continue >*/
  1577. /* L184: */
  1578.     }
  1579. /*<       go to 160 >*/
  1580.     goto L160;
  1581.  
  1582. /*  independent sources */
  1583.  
  1584. /*<   200 ifld=3 >*/
  1585. L200:
  1586.     ifld = 3;
  1587. /*<       call getm8(nodplc(loc+5),0) >*/
  1588.     getm8_(&nodplc[loc + 4], &c__0);
  1589. /*<   210 ifld=ifld+1 >*/
  1590. L210:
  1591.     ++ifld;
  1592. /*<   215 if (nodplc(icode+ifld)) 50,220,230 >*/
  1593. L215:
  1594.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1595.     goto L50;
  1596.     } else if (i_1 == 0) {
  1597.     goto L220;
  1598.     } else {
  1599.     goto L230;
  1600.     }
  1601. /*<   220 if (ifld.gt.4) go to 210 >*/
  1602. L220:
  1603.     if (ifld > 4) {
  1604.     goto L210;
  1605.     }
  1606. /*<   225 value(locv+1)=value(ifield+ifld) >*/
  1607. L225:
  1608.     blank_1.value[locv] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1609. /*<       go to 210 >*/
  1610.     goto L210;
  1611. /*<   230 anam=value(ifield+ifld) >*/
  1612. L230:
  1613.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1614. /*<       if (anam.ne.alsdc) go to 235 >*/
  1615.     if (anam != alsdc) {
  1616.     goto L235;
  1617.     }
  1618. /*<       ifld=ifld+1 >*/
  1619.     ++ifld;
  1620. /*<       if (nodplc(icode+ifld)) 50,225,230 >*/
  1621.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1622.     goto L50;
  1623.     } else if (i_1 == 0) {
  1624.     goto L225;
  1625.     } else {
  1626.     goto L230;
  1627.     }
  1628. /*<   235 if (anam.ne.alsac) go to 260 >*/
  1629. L235:
  1630.     if (anam != alsac) {
  1631.     goto L260;
  1632.     }
  1633. /*<       value(locv+2)=1.0d0 >*/
  1634.     blank_1.value[locv + 1] = 1.;
  1635. /*<       ifld=ifld+1 >*/
  1636.     ++ifld;
  1637. /*<       if (nodplc(icode+ifld)) 50,240,230 >*/
  1638.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1639.     goto L50;
  1640.     } else if (i_1 == 0) {
  1641.     goto L240;
  1642.     } else {
  1643.     goto L230;
  1644.     }
  1645. /*<   240 value(locv+2)=value(ifield+ifld) >*/
  1646. L240:
  1647.     blank_1.value[locv + 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1648. /*<       ifld=ifld+1 >*/
  1649.     ++ifld;
  1650. /*<       if (nodplc(icode+ifld)) 50,250,230 >*/
  1651.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1652.     goto L50;
  1653.     } else if (i_1 == 0) {
  1654.     goto L250;
  1655.     } else {
  1656.     goto L230;
  1657.     }
  1658. /*<   250 value(locv+3)=value(ifield+ifld) >*/
  1659. L250:
  1660.     blank_1.value[locv + 2] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1661. /*<       go to 210 >*/
  1662.     goto L210;
  1663. /*<   260 id=0 >*/
  1664. L260:
  1665.     id = 0;
  1666. /*<       call move(anam,3,ablnk,1,6) >*/
  1667.     move_(&anam, &c__3, &ablnk, &c__1, &c__6);
  1668. /*<       if (anam.eq.alspu) id=1 >*/
  1669.     if (anam == alspu) {
  1670.     id = 1;
  1671.     }
  1672. /*<       if (anam.eq.alssi) id=2 >*/
  1673.     if (anam == alssi) {
  1674.     id = 2;
  1675.     }
  1676. /*<       if (anam.eq.alsex) id=3 >*/
  1677.     if (anam == alsex) {
  1678.     id = 3;
  1679.     }
  1680. /*<       if (anam.eq.alspw) id=4 >*/
  1681.     if (anam == alspw) {
  1682.     id = 4;
  1683.     }
  1684. /*<       if (anam.eq.alssf) id=5 >*/
  1685.     if (anam == alssf) {
  1686.     id = 5;
  1687.     }
  1688. /*<       if (id.eq.0) go to 450 >*/
  1689.     if (id == 0) {
  1690.     goto L450;
  1691.     }
  1692. /*<       nodplc(loc+4)=id >*/
  1693.     nodplc[loc + 3] = id;
  1694. /*<       iknt=0 >*/
  1695.     iknt = 0;
  1696. /*<   270 ifld=ifld+1 >*/
  1697. L270:
  1698.     ++ifld;
  1699. /*<       if (nodplc(icode+ifld).ne.0) go to 280 >*/
  1700.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  1701.     goto L280;
  1702.     }
  1703. /*<       call extmem(nodplc(loc+5),1) >*/
  1704.     extmem_(&nodplc[loc + 4], &c__1);
  1705. /*<       iknt=iknt+1 >*/
  1706.     ++iknt;
  1707. /*<       ispot=nodplc(loc+5)+iknt >*/
  1708.     ispot = nodplc[loc + 4] + iknt;
  1709. /*<       value(ispot)=value(ifield+ifld) >*/
  1710.     blank_1.value[ispot - 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1711. /*<       go to 270 >*/
  1712.     goto L270;
  1713. /*<   280 aval=0.0d0 >*/
  1714. L280:
  1715.     aval = 0.;
  1716. /*<       if (id.ne.4) go to 285 >*/
  1717.     if (id != 4) {
  1718.     goto L285;
  1719.     }
  1720. /* ...  for pwl source function, force even number of input values */
  1721. /*<       ibit=0 >*/
  1722.     ibit = 0;
  1723. /*<       if(iknt.ne.(iknt/2)*2) ibit=1 >*/
  1724.     if (iknt != iknt / 2 << 1) {
  1725.     ibit = 1;
  1726.     }
  1727. /*<       aval=value(ispot) >*/
  1728.     aval = blank_1.value[ispot - 1];
  1729. /*<       if (ibit.eq.0) go to 290 >*/
  1730.     if (ibit == 0) {
  1731.     goto L290;
  1732.     }
  1733. /*<       call extmem(nodplc(loc+5),1) >*/
  1734.     extmem_(&nodplc[loc + 4], &c__1);
  1735. /*<       aval=value(ispot-1) >*/
  1736.     aval = blank_1.value[ispot - 2];
  1737. /*<       iknt=iknt+1 >*/
  1738.     ++iknt;
  1739. /*<       ispot=nodplc(loc+5)+iknt >*/
  1740.     ispot = nodplc[loc + 4] + iknt;
  1741. /*<       value(ispot)=aval >*/
  1742.     blank_1.value[ispot - 1] = aval;
  1743. /*<       go to 290 >*/
  1744.     goto L290;
  1745. /*<   285 if (iknt.ge.7) go to 215 >*/
  1746. L285:
  1747.     if (iknt >= 7) {
  1748.     goto L215;
  1749.     }
  1750. /*<   290 call extmem(nodplc(loc+5),2) >*/
  1751. L290:
  1752.     extmem_(&nodplc[loc + 4], &c__2);
  1753. /*<       ispot=nodplc(loc+5)+iknt >*/
  1754.     ispot = nodplc[loc + 4] + iknt;
  1755. /*<       value(ispot+1)=0.0d0 >*/
  1756.     blank_1.value[ispot] = 0.;
  1757. /*<       value(ispot+2)=aval >*/
  1758.     blank_1.value[ispot + 1] = aval;
  1759. /*<       iknt=iknt+2 >*/
  1760.     iknt += 2;
  1761. /*<       go to 285 >*/
  1762.     goto L285;
  1763.  
  1764. /*  device cards */
  1765.  
  1766. /*<   300 value(locv+1)=1.0d0 >*/
  1767. L300:
  1768.     blank_1.value[locv] = 1.;
  1769. /*<       if (id.ne.14) go to 305 >*/
  1770.     if (id != 14) {
  1771.     goto L305;
  1772.     }
  1773. /*<       value(locv+1)=0.0d0 >*/
  1774.     blank_1.value[locv] = 0.;
  1775. /*<       value(locv+11)=0.0d0 >*/
  1776.     blank_1.value[locv + 10] = 0.;
  1777. /*<       value(locv+12)=0.0d0 >*/
  1778.     blank_1.value[locv + 11] = 0.;
  1779. /*<       value(locv+13)=1.0d0 >*/
  1780.     blank_1.value[locv + 12] = 1.;
  1781. /*<       value(locv+14)=1.0d0 >*/
  1782.     blank_1.value[locv + 13] = 1.;
  1783. /*<       value(locv+15)=0.0d0 >*/
  1784.     blank_1.value[locv + 14] = 0.;
  1785. /*<   305 locm=loc+ntnods(id)+2 >*/
  1786. L305:
  1787.     locm = loc + ntnods[id - 1] + 2;
  1788. /*<       ifld=nnods(id)+2 >*/
  1789.     ifld = nnods[id - 1] + 2;
  1790.  
  1791. /*  temporarily (until modchk) put bjt
  1792. 's substrate node into nodplc(loc+5) */
  1793.  
  1794. /*<       if(id.ne.12) go to 308 >*/
  1795.     if (id != 12) {
  1796.     goto L308;
  1797.     }
  1798. /*<       if(nodplc(icode+5).ne.0) go to 308 >*/
  1799.     if (nodplc[tabinf_1.icode + 4] != 0) {
  1800.     goto L308;
  1801.     }
  1802. /*<       ifld=6 >*/
  1803.     ifld = 6;
  1804. /*<       if (nodplc(loc+l2nod(id)).ne.0) go to 306 >*/
  1805.     if (nodplc[loc + l2nod[id - 1] - 1] != 0) {
  1806.     goto L306;
  1807.     }
  1808. /*<       nodplc(loc+5)=value(ifield+5) >*/
  1809.     nodplc[loc + 4] = (integer) blank_1.value[tabinf_1.ifield + 4];
  1810. /*<       go to 308 >*/
  1811.     goto L308;
  1812. /*<   306 nodplc(loc+5)=0 >*/
  1813. L306:
  1814.     nodplc[loc + 4] = 0;
  1815. /*<   308 continue >*/
  1816. L308:
  1817.  
  1818. /*    reserve device internal nodes,read device geometry parameters */
  1819. /*    and initial conditions */
  1820.  
  1821. /*<       if (nodplc(icode+ifld).ne.1) go to 440 >*/
  1822.     if (nodplc[tabinf_1.icode + ifld - 1] != 1) {
  1823.     goto L440;
  1824.     }
  1825. /*<       call extnam(value(ifield+ifld),nodplc(locm)) >*/
  1826.     extnam_(&blank_1.value[tabinf_1.ifield + ifld - 1], &nodplc[locm - 1]);
  1827. /*<   310 ifld=ifld+1 >*/
  1828. L310:
  1829.     ++ifld;
  1830. /*<       if (nodplc(icode+ifld)) 50,325,315 >*/
  1831.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1832.     goto L50;
  1833.     } else if (i_1 == 0) {
  1834.     goto L325;
  1835.     } else {
  1836.     goto L315;
  1837.     }
  1838. /*<   315 anam=value(ifield+ifld) >*/
  1839. L315:
  1840.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  1841. /*<       if (anam.ne.alsoff) go to 320 >*/
  1842.     if (anam != alsoff) {
  1843.     goto L320;
  1844.     }
  1845. /*<       nodplc(locm+1)=1 >*/
  1846.     nodplc[locm] = 1;
  1847. /*<       go to 310 >*/
  1848.     goto L310;
  1849. /*<   320 if (anam.ne.area) go to 330 >*/
  1850. L320:
  1851.     if (anam != area) {
  1852.     goto L330;
  1853.     }
  1854. /*<       ifld=ifld+1 >*/
  1855.     ++ifld;
  1856. /*<       if (nodplc(icode+ifld)) 50,325,315 >*/
  1857.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1858.     goto L50;
  1859.     } else if (i_1 == 0) {
  1860.     goto L325;
  1861.     } else {
  1862.     goto L315;
  1863.     }
  1864. /*<   325 if (value(ifield+ifld).le.0.0d0) go to 420 >*/
  1865. L325:
  1866.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  1867.     goto L420;
  1868.     }
  1869. /*<       if (id.eq.14) go to 343 >*/
  1870.     if (id == 14) {
  1871.     goto L343;
  1872.     }
  1873. /*<       value(locv+1)=value(ifield+ifld) >*/
  1874.     blank_1.value[locv] = blank_1.value[tabinf_1.ifield + ifld - 1];
  1875. /*<       go to 310 >*/
  1876.     goto L310;
  1877. /*<   330 if (anam.ne.aic) go to 341 >*/
  1878. L330:
  1879.     if (anam != aic) {
  1880.     goto L341;
  1881.     }
  1882. /*<       iknt=0 >*/
  1883.     iknt = 0;
  1884. /*<       icloc=0 >*/
  1885.     icloc = 0;
  1886. /*<       if (id.eq.14) icloc=3 >*/
  1887.     if (id == 14) {
  1888.     icloc = 3;
  1889.     }
  1890. /*<       maxknt=numic(id-10) >*/
  1891.     maxknt = numic[id - 11];
  1892. /*<   335 ifld=ifld+1 >*/
  1893. L335:
  1894.     ++ifld;
  1895. /*<       if (nodplc(icode+ifld)) 50,340,315 >*/
  1896.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1897.     goto L50;
  1898.     } else if (i_1 == 0) {
  1899.     goto L340;
  1900.     } else {
  1901.     goto L315;
  1902.     }
  1903. /*<   340 iknt=iknt+1 >*/
  1904. L340:
  1905.     ++iknt;
  1906. /*<       if (iknt.gt.maxknt) go to 335 >*/
  1907.     if (iknt > maxknt) {
  1908.     goto L335;
  1909.     }
  1910. /*<       value(locv+icloc+iknt+1)=value(ifield+ifld) >*/
  1911.     blank_1.value[locv + icloc + iknt] = blank_1.value[tabinf_1.ifield + ifld 
  1912.         - 1];
  1913. /*<       go to 335 >*/
  1914.     goto L335;
  1915. /*<   341 if (id.ne.14) go to 460 >*/
  1916. L341:
  1917.     if (id != 14) {
  1918.     goto L460;
  1919.     }
  1920. /*<       ispot=0 >*/
  1921.     ispot = 0;
  1922. /*<       if (anam.eq.alsl) ispot=1 >*/
  1923.     if (anam == alsl) {
  1924.     ispot = 1;
  1925.     }
  1926. /*<       if (anam.eq.alsw) ispot=2 >*/
  1927.     if (anam == alsw) {
  1928.     ispot = 2;
  1929.     }
  1930. /*<       if (anam.eq.alsad) ispot=3 >*/
  1931.     if (anam == alsad) {
  1932.     ispot = 3;
  1933.     }
  1934. /*<       if (anam.eq.alszx) ispot=3 >*/
  1935.     if (anam == alszx) {
  1936.     ispot = 3;
  1937.     }
  1938. /*<       if (anam.eq.alsas) ispot=4 >*/
  1939.     if (anam == alsas) {
  1940.     ispot = 4;
  1941.     }
  1942. /*<       if (anam.eq.alspd) ispot=11 >*/
  1943.     if (anam == alspd) {
  1944.     ispot = 11;
  1945.     }
  1946. /*<       if (anam.eq.alsps) ispot=12 >*/
  1947.     if (anam == alsps) {
  1948.     ispot = 12;
  1949.     }
  1950. /*<       if (anam.eq.alsrds) ispot=13 >*/
  1951.     if (anam == alsrds) {
  1952.     ispot = 13;
  1953.     }
  1954. /*<       if (anam.eq.alsrss) ispot=14 >*/
  1955.     if (anam == alsrss) {
  1956.     ispot = 14;
  1957.     }
  1958. /*<       if (anam.eq.alsxqc) ispot=15 >*/
  1959.     if (anam == alsxqc) {
  1960.     ispot = 15;
  1961.     }
  1962. /*<       if (ispot.eq.0) go to 460 >*/
  1963.     if (ispot == 0) {
  1964.     goto L460;
  1965.     }
  1966. /*<       ifld=ifld+1 >*/
  1967.     ++ifld;
  1968. /*<       if (nodplc(icode+ifld)) 50,342,315 >*/
  1969.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  1970.     goto L50;
  1971.     } else if (i_1 == 0) {
  1972.     goto L342;
  1973.     } else {
  1974.     goto L315;
  1975.     }
  1976. /*<   342 if (value(ifield+ifld).le.0.0d0) go to 420 >*/
  1977. L342:
  1978.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  1979.     goto L420;
  1980.     }
  1981. /*<       value(locv+ispot)=value(ifield+ifld) >*/
  1982.     blank_1.value[locv + ispot - 1] = blank_1.value[tabinf_1.ifield + ifld - 
  1983.         1];
  1984. /*<       go to 310 >*/
  1985.     goto L310;
  1986. /*<   343 iknt=0 >*/
  1987. L343:
  1988.     iknt = 0;
  1989. /*<   344 iknt=iknt+1 >*/
  1990. L344:
  1991.     ++iknt;
  1992. /*<       if(value(ifield+ifld).le.0.0d0) go to 420 >*/
  1993.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  1994.     goto L420;
  1995.     }
  1996. /*<       if(iknt.gt.15) go to 490 >*/
  1997.     if (iknt > 15) {
  1998.     goto L490;
  1999.     }
  2000. /*<       if(iknt.eq.5) iknt=11 >*/
  2001.     if (iknt == 5) {
  2002.     iknt = 11;
  2003.     }
  2004. /*<       value(locv+iknt)=value(ifield+ifld) >*/
  2005.     blank_1.value[locv + iknt - 1] = blank_1.value[tabinf_1.ifield + ifld - 1]
  2006.         ;
  2007. /*<       ifld=ifld+1 >*/
  2008.     ++ifld;
  2009. /*<       if(nodplc(icode+ifld)) 345,344,345 >*/
  2010.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  2011.     goto L345;
  2012.     } else {
  2013.     goto L344;
  2014.     }
  2015. /*<   345 if(nodplc(icode+ifld)) 50,50,315 >*/
  2016. L345:
  2017.     if (nodplc[tabinf_1.icode + ifld - 1] <= 0) {
  2018.     goto L50;
  2019.     } else {
  2020.     goto L315;
  2021.     }
  2022.  
  2023. /*  transmission lines */
  2024.  
  2025. /*<   350 ifld=5 >*/
  2026. L350:
  2027.     ifld = 5;
  2028. /*<       xnl=0.25d0 >*/
  2029.     xnl = .25;
  2030. /*<       tfreq=0.0d0 >*/
  2031.     tfreq = 0.;
  2032. /*<   355 ifld=ifld+1 >*/
  2033. L355:
  2034.     ++ifld;
  2035. /*<       if (nodplc(icode+ifld)) 378,355,360 >*/
  2036.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2037.     goto L378;
  2038.     } else if (i_1 == 0) {
  2039.     goto L355;
  2040.     } else {
  2041.     goto L360;
  2042.     }
  2043. /*<   360 anam=value(ifield+ifld) >*/
  2044. L360:
  2045.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  2046. /*<       if (anam.eq.aic) go to 364 >*/
  2047.     if (anam == aic) {
  2048.     goto L364;
  2049.     }
  2050. /*<       if (anam.eq.alsnl) go to 370 >*/
  2051.     if (anam == alsnl) {
  2052.     goto L370;
  2053.     }
  2054. /*<       if (anam.eq.alsf) go to 374 >*/
  2055.     if (anam == alsf) {
  2056.     goto L374;
  2057.     }
  2058. /*<       id=0 >*/
  2059.     id = 0;
  2060. /*<       if (anam.eq.alsz0) id=1 >*/
  2061.     if (anam == alsz0) {
  2062.     id = 1;
  2063.     }
  2064. /*<       if (anam.eq.alszo) id=1 >*/
  2065.     if (anam == alszo) {
  2066.     id = 1;
  2067.     }
  2068. /*<       if (anam.eq.alstd) id=2 >*/
  2069.     if (anam == alstd) {
  2070.     id = 2;
  2071.     }
  2072. /*<       if (id.eq.0) go to 460 >*/
  2073.     if (id == 0) {
  2074.     goto L460;
  2075.     }
  2076. /*<       ifld=ifld+1 >*/
  2077.     ++ifld;
  2078. /*<       if (nodplc(icode+ifld)) 378,362,360 >*/
  2079.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2080.     goto L378;
  2081.     } else if (i_1 == 0) {
  2082.     goto L362;
  2083.     } else {
  2084.     goto L360;
  2085.     }
  2086. /*<   362 if (value(ifield+ifld).le.0.0d0) go to 420 >*/
  2087. L362:
  2088.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  2089.     goto L420;
  2090.     }
  2091. /*<       value(locv+id)=value(ifield+ifld) >*/
  2092.     blank_1.value[locv + id - 1] = blank_1.value[tabinf_1.ifield + ifld - 1];
  2093. /*<       go to 355 >*/
  2094.     goto L355;
  2095. /*<   364 iknt=0 >*/
  2096. L364:
  2097.     iknt = 0;
  2098. /*<   366 ifld=ifld+1 >*/
  2099. L366:
  2100.     ++ifld;
  2101. /*<       if (nodplc(icode+ifld)) 378,368,360 >*/
  2102.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2103.     goto L378;
  2104.     } else if (i_1 == 0) {
  2105.     goto L368;
  2106.     } else {
  2107.     goto L360;
  2108.     }
  2109. /*<   368 iknt=iknt+1 >*/
  2110. L368:
  2111.     ++iknt;
  2112. /*<       if (iknt.gt.4) go to 366 >*/
  2113.     if (iknt > 4) {
  2114.     goto L366;
  2115.     }
  2116. /*<       value(locv+iknt+4)=value(ifield+ifld) >*/
  2117.     blank_1.value[locv + iknt + 3] = blank_1.value[tabinf_1.ifield + ifld - 1]
  2118.         ;
  2119. /*<       go to 366 >*/
  2120.     goto L366;
  2121. /*<   370 ifld=ifld+1 >*/
  2122. L370:
  2123.     ++ifld;
  2124. /*<       if (nodplc(icode+ifld)) 378,372,360 >*/
  2125.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2126.     goto L378;
  2127.     } else if (i_1 == 0) {
  2128.     goto L372;
  2129.     } else {
  2130.     goto L360;
  2131.     }
  2132. /*<   372 if (value(ifield+ifld).le.0.0d0) go to 420 >*/
  2133. L372:
  2134.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  2135.     goto L420;
  2136.     }
  2137. /*<       xnl=value(ifield+ifld) >*/
  2138.     xnl = blank_1.value[tabinf_1.ifield + ifld - 1];
  2139. /*<       go to 355 >*/
  2140.     goto L355;
  2141. /*<   374 ifld=ifld+1 >*/
  2142. L374:
  2143.     ++ifld;
  2144. /*<       if (nodplc(icode+ifld)) 378,376,360 >*/
  2145.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2146.     goto L378;
  2147.     } else if (i_1 == 0) {
  2148.     goto L376;
  2149.     } else {
  2150.     goto L360;
  2151.     }
  2152. /*<   376 if (value(ifield+ifld).le.0.0d0) go to 420 >*/
  2153. L376:
  2154.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  2155.     goto L420;
  2156.     }
  2157. /*<       tfreq=value(ifield+ifld) >*/
  2158.     tfreq = blank_1.value[tabinf_1.ifield + ifld - 1];
  2159. /*<       go to 355 >*/
  2160.     goto L355;
  2161. /*<   378 if (value(locv+1).ne.0.0d0) go to 380 >*/
  2162. L378:
  2163.     if (blank_1.value[locv] != 0.) {
  2164.     goto L380;
  2165.     }
  2166. /*<       write (iofile,379) >*/
  2167.     io__74.ciunit = status_1.iofile;
  2168.     s_wsfe(&io__74);
  2169.     e_wsfe();
  2170. /*<   379 format('0*error*:  z0 must be specified'/) >*/
  2171. /*<       go to 40 >*/
  2172.     goto L40;
  2173. /*<   380 if (value(locv+2).ne.0.0d0) go to 50 >*/
  2174. L380:
  2175.     if (blank_1.value[locv + 1] != 0.) {
  2176.     goto L50;
  2177.     }
  2178. /*<       if (tfreq.ne.0.0d0) go to 382 >*/
  2179.     if (tfreq != 0.) {
  2180.     goto L382;
  2181.     }
  2182. /*<       write (iofile,381) >*/
  2183.     io__75.ciunit = status_1.iofile;
  2184.     s_wsfe(&io__75);
  2185.     e_wsfe();
  2186. /*<   381 format('0*error*:  either td or f must be specified'/) >*/
  2187. /*<       go to 40 >*/
  2188.     goto L40;
  2189. /*<   382 value(locv+2)=xnl/tfreq >*/
  2190. L382:
  2191.     blank_1.value[locv + 1] = xnl / tfreq;
  2192. /*<       go to 50 >*/
  2193.     goto L50;
  2194.  
  2195. /*  elements not yet implemented */
  2196.  
  2197. /*<   390 write (iofile,391) >*/
  2198. L390:
  2199.     io__76.ciunit = status_1.iofile;
  2200.     s_wsfe(&io__76);
  2201.     e_wsfe();
  2202. /*<   391 format('0*error*:  element type not yet implemented'/) >*/
  2203. /*<       go to 40 >*/
  2204.     goto L40;
  2205.  
  2206. /*  element card errors */
  2207.  
  2208. /*<   400 write (iofile,401) >*/
  2209. L400:
  2210.     io__77.ciunit = status_1.iofile;
  2211.     s_wsfe(&io__77);
  2212.     e_wsfe();
  2213. /*<   401 format('0*error*:  negative node number found'/) >*/
  2214. /*<       go to 40 >*/
  2215.     goto L40;
  2216. /*<   410 write (iofile,411) >*/
  2217. L410:
  2218.     io__78.ciunit = status_1.iofile;
  2219.     s_wsfe(&io__78);
  2220.     e_wsfe();
  2221. /*<   411 format('0*error*:  node numbers are missing'/) >*/
  2222. /*<       go to 40 >*/
  2223.     goto L40;
  2224. /*<   420 write (iofile,421) >*/
  2225. L420:
  2226.     io__79.ciunit = status_1.iofile;
  2227.     s_wsfe(&io__79);
  2228.     e_wsfe();
  2229. /*<   421 format('0*error*:  value is missing or is nonpositive'/) >*/
  2230. /*<       go to 40 >*/
  2231.     goto L40;
  2232. /*<   430 write (iofile,431) >*/
  2233. L430:
  2234.     io__80.ciunit = status_1.iofile;
  2235.     s_wsfe(&io__80);
  2236.     e_wsfe();
  2237. /*<   431 format('0*error*:  mutual inductance references are missing'/) >*/
  2238. /*<       go to 40 >*/
  2239.     goto L40;
  2240. /*<   440 write (iofile,441) >*/
  2241. L440:
  2242.     io__81.ciunit = status_1.iofile;
  2243.     s_wsfe(&io__81);
  2244.     e_wsfe();
  2245. /*<   441 format('0*error*:  model name is missing'/) >*/
  2246. /*<       go to 40 >*/
  2247.     goto L40;
  2248. /*<   450 write (iofile,451) anam >*/
  2249. L450:
  2250.     io__82.ciunit = status_1.iofile;
  2251.     s_wsfe(&io__82);
  2252.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  2253.     e_wsfe();
  2254. /*<   451 format('0*error*:  unknown source function:  ',a8) >*/
  2255. /*<       go to 40 >*/
  2256.     goto L40;
  2257. /*<   460 write (iofile,461) anam >*/
  2258. L460:
  2259.     io__83.ciunit = status_1.iofile;
  2260.     s_wsfe(&io__83);
  2261.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  2262.     e_wsfe();
  2263. /*<   461 format('0*error*:  unknown parameter:  ',a8/) >*/
  2264. /*<       go to 40 >*/
  2265.     goto L40;
  2266. /*<   470 write (iofile,471) >*/
  2267. L470:
  2268.     io__84.ciunit = status_1.iofile;
  2269.     s_wsfe(&io__84);
  2270.     e_wsfe();
  2271. /*<   471 format('0*error*:  voltage source not found on above line'/) >*/
  2272. /*<       go to 40 >*/
  2273.     goto L40;
  2274. /*<   480 write (iofile,481) >*/
  2275. L480:
  2276.     io__85.ciunit = status_1.iofile;
  2277.     s_wsfe(&io__85);
  2278.     e_wsfe();
  2279. /*<   481 format('0*error*:  value is zero'/) >*/
  2280. /*<       go to 40 >*/
  2281.     goto L40;
  2282. /*<   490 write(iofile,491) >*/
  2283. L490:
  2284.     io__86.ciunit = status_1.iofile;
  2285.     s_wsfe(&io__86);
  2286.     e_wsfe();
  2287. /*<   491 format('0*error*:  extra numerical data on mosfet card'/) >*/
  2288. /*<       go to 40 >*/
  2289.     goto L40;
  2290.  
  2291. /*  model card */
  2292.  
  2293. /*<   500 if (nodplc(icode+2).ne.1) go to 650 >*/
  2294. L500:
  2295.     if (nodplc[tabinf_1.icode + 1] != 1) {
  2296.     goto L650;
  2297.     }
  2298. /*<       if (nodplc(icode+3).ne.1) go to 650 >*/
  2299.     if (nodplc[tabinf_1.icode + 2] != 1) {
  2300.     goto L650;
  2301.     }
  2302. /*<       id=0 >*/
  2303.     id = 0;
  2304. /*<   510 id=id+1 >*/
  2305. L510:
  2306.     ++id;
  2307. /*<       if (id.gt.7) go to 660 >*/
  2308.     if (id > 7) {
  2309.     goto L660;
  2310.     }
  2311. /*<       if (value(ifield+3).ne.aidm(id)) go to 510 >*/
  2312.     if (blank_1.value[tabinf_1.ifield + 2] != aidm[id - 1]) {
  2313.     goto L510;
  2314.     }
  2315. /*<       ipol=ipolar(id) >*/
  2316.     ipol = ipolar[id - 1];
  2317. /*<       jtype=modid(id) >*/
  2318.     jtype = modid[id - 1];
  2319. /*<       id=jtype+20 >*/
  2320.     id = jtype + 20;
  2321. /*<       call find(value(ifield+2),id,loc,1) >*/
  2322.     find_(&blank_1.value[tabinf_1.ifield + 1], &id, &loc, &c__1);
  2323. /*<       nodplc(loc+2)=ipol >*/
  2324.     nodplc[loc + 1] = ipol;
  2325. /*<       locv=nodplc(loc+1) >*/
  2326.     locv = nodplc[loc];
  2327. /*<   520 locm=ipar(jtype) >*/
  2328. /* L520: */
  2329.     locm = ipar[jtype - 1];
  2330. /*<       nopar=ipar(jtype+1)-locm >*/
  2331.     nopar = ipar[jtype] - locm;
  2332. /*<       ifld=3 >*/
  2333.     ifld = 3;
  2334. /*<   530 ifld=ifld+1 >*/
  2335. L530:
  2336.     ++ifld;
  2337. /*<       if (nodplc(icode+ifld)) 50,530,560 >*/
  2338.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2339.     goto L50;
  2340.     } else if (i_1 == 0) {
  2341.     goto L530;
  2342.     } else {
  2343.     goto L560;
  2344.     }
  2345. /*<   560 anam=value(ifield+ifld) >*/
  2346. L560:
  2347.     anam = blank_1.value[tabinf_1.ifield + ifld - 1];
  2348. /*<       if(jtype.eq.2) anam=alias(anam) >*/
  2349.     if (jtype == 2) {
  2350.     anam = alias_(&anam);
  2351.     }
  2352. /*<       iknt=0 >*/
  2353.     iknt = 0;
  2354. /*<   570 iknt=iknt+1 >*/
  2355. L570:
  2356.     ++iknt;
  2357. /*<       if (iknt.gt.nopar) go to 670 >*/
  2358.     if (iknt > nopar) {
  2359.     goto L670;
  2360.     }
  2361. /*<       if (anam.ne.ampar(locm+iknt)) go to 570 >*/
  2362.     if (anam != ampar[locm + iknt - 1]) {
  2363.     goto L570;
  2364.     }
  2365. /*<       ifld=ifld+1 >*/
  2366.     ++ifld;
  2367. /*<       if (nodplc(icode+ifld)) 50,580,560 >*/
  2368.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2369.     goto L50;
  2370.     } else if (i_1 == 0) {
  2371.     goto L580;
  2372.     } else {
  2373.     goto L560;
  2374.     }
  2375. /*<   580 value(locv+iknt)=value(ifield+ifld) >*/
  2376. L580:
  2377.     blank_1.value[locv + iknt - 1] = blank_1.value[tabinf_1.ifield + ifld - 1]
  2378.         ;
  2379. /*<       ifld=ifld+1 >*/
  2380.     ++ifld;
  2381. /*<       if (nodplc(icode+ifld)) 50,590,560 >*/
  2382.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2383.     goto L50;
  2384.     } else if (i_1 == 0) {
  2385.     goto L590;
  2386.     } else {
  2387.     goto L560;
  2388.     }
  2389. /*<   590 iknt=iknt+1 >*/
  2390. L590:
  2391.     ++iknt;
  2392. /*<       if (iknt.gt.nopar) go to 530 >*/
  2393.     if (iknt > nopar) {
  2394.     goto L530;
  2395.     }
  2396. /*<       if (ablnk.ne.ampar(locm+iknt)) go to 530 >*/
  2397.     if (ablnk != ampar[locm + iknt - 1]) {
  2398.     goto L530;
  2399.     }
  2400. /*<       go to 580 >*/
  2401.     goto L580;
  2402.  
  2403. /*  model card errors */
  2404.  
  2405. /*<   650 write (iofile,651) >*/
  2406. L650:
  2407.     io__90.ciunit = status_1.iofile;
  2408.     s_wsfe(&io__90);
  2409.     e_wsfe();
  2410. /*<   651 format('0*error*:  model type is missing'/) >*/
  2411. /*<       go to 40 >*/
  2412.     goto L40;
  2413. /*<   660 write (iofile,661) value(ifield+3) >*/
  2414. L660:
  2415.     io__91.ciunit = status_1.iofile;
  2416.     s_wsfe(&io__91);
  2417.     do_fio(&c__1, (char *)&blank_1.value[tabinf_1.ifield + 2], (ftnlen)sizeof(
  2418.         doublereal));
  2419.     e_wsfe();
  2420. /*<   661 format('0*error*:  unknown model type:  ',a8/) >*/
  2421. /*<       go to 40 >*/
  2422.     goto L40;
  2423. /*<   670 write (iofile,671) anam >*/
  2424. L670:
  2425.     io__92.ciunit = status_1.iofile;
  2426.     s_wsfe(&io__92);
  2427.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  2428.     e_wsfe();
  2429. /*<   671 format('0*error*:  unknown model parameter:  ',a8,/) >*/
  2430. /*<       nogo=1 >*/
  2431.     flags_1.nogo = 1;
  2432. /*<       go to 530 >*/
  2433.     goto L530;
  2434.  
  2435. /*  subcircuit definition */
  2436.  
  2437. /*<   700 if (nodplc(icode+2).ne.1) go to 780 >*/
  2438. L700:
  2439.     if (nodplc[tabinf_1.icode + 1] != 1) {
  2440.     goto L780;
  2441.     }
  2442. /*<       call find(value(ifield+2),20,loc,1) >*/
  2443.     find_(&blank_1.value[tabinf_1.ifield + 1], &c__20, &loc, &c__1);
  2444. /*<       call extmem(isbckt,1) >*/
  2445.     extmem_(&tabinf_1.isbckt, &c__1);
  2446. /*<       nsbckt=nsbckt+1 >*/
  2447.     ++tabinf_1.nsbckt;
  2448. /*<       nodplc(isbckt+nsbckt)=loc >*/
  2449.     nodplc[tabinf_1.isbckt + tabinf_1.nsbckt - 1] = loc;
  2450. /*<       ifld=2 >*/
  2451.     ifld = 2;
  2452. /*<       if (nodplc(icode+3).ne.0) go to 790 >*/
  2453.     if (nodplc[tabinf_1.icode + 2] != 0) {
  2454.     goto L790;
  2455.     }
  2456. /*<       call getm4(nodplc(loc+2),0) >*/
  2457.     getm4_(&nodplc[loc + 1], &c__0);
  2458. /*<       iknt=0 >*/
  2459.     iknt = 0;
  2460. /*<   710 ifld=ifld+1 >*/
  2461. L710:
  2462.     ++ifld;
  2463. /*<       if (nodplc(icode+ifld)) 50,720,710 >*/
  2464.     if ((i_1 = nodplc[tabinf_1.icode + ifld - 1]) < 0) {
  2465.     goto L50;
  2466.     } else if (i_1 == 0) {
  2467.     goto L720;
  2468.     } else {
  2469.     goto L710;
  2470.     }
  2471. /*<   720 call extmem(nodplc(loc+2),1) >*/
  2472. L720:
  2473.     extmem_(&nodplc[loc + 1], &c__1);
  2474. /*<       iknt=iknt+1 >*/
  2475.     ++iknt;
  2476. /*<       ispot=nodplc(loc+2)+iknt >*/
  2477.     ispot = nodplc[loc + 1] + iknt;
  2478. /*<       if (value(ifield+ifld).le.0.0d0) go to 770 >*/
  2479.     if (blank_1.value[tabinf_1.ifield + ifld - 1] <= 0.) {
  2480.     goto L770;
  2481.     }
  2482. /*<       nodplc(ispot)=value(ifield+ifld) >*/
  2483.     nodplc[ispot - 1] = (integer) blank_1.value[tabinf_1.ifield + ifld - 1];
  2484. /*<       node=nodplc(ispot) >*/
  2485.     node = nodplc[ispot - 1];
  2486. /*<       i=iknt-1 >*/
  2487.     i = iknt - 1;
  2488. /*<   730 if (i.eq.0) go to 710 >*/
  2489. L730:
  2490.     if (i == 0) {
  2491.     goto L710;
  2492.     }
  2493. /*<       ispot=ispot-1 >*/
  2494.     --ispot;
  2495. /*<       if (nodplc(ispot).eq.node) go to 760 >*/
  2496.     if (nodplc[ispot - 1] == node) {
  2497.     goto L760;
  2498.     }
  2499. /*<       i=i-1 >*/
  2500.     --i;
  2501. /*<       go to 730 >*/
  2502.     goto L730;
  2503. /*<   760 write (iofile,761) node >*/
  2504. L760:
  2505.     io__94.ciunit = status_1.iofile;
  2506.     s_wsfe(&io__94);
  2507.     do_fio(&c__1, (char *)&node, (ftnlen)sizeof(integer));
  2508.     e_wsfe();
  2509. /*<   761 format('0*error*:  subcircuit definition duplicates node ',i5,/) >*/
  2510. /*<       go to 40 >*/
  2511.     goto L40;
  2512. /*<   770 write (iofile,771) >*/
  2513. L770:
  2514.     io__95.ciunit = status_1.iofile;
  2515.     s_wsfe(&io__95);
  2516.     e_wsfe();
  2517. /*<   771 format('0*error*:  nonpositive node number found in subcircuit ', >*/
  2518. /*<      1   'definition'/) >*/
  2519. /*<       go to 40 >*/
  2520.     goto L40;
  2521. /*<   780 write (iofile,781) >*/
  2522. L780:
  2523.     io__96.ciunit = status_1.iofile;
  2524.     s_wsfe(&io__96);
  2525.     e_wsfe();
  2526. /*<   781 format('0*error*:  subcircuit name missing'/) >*/
  2527. /*<       go to 40 >*/
  2528.     goto L40;
  2529. /*<   790 write (iofile,791) >*/
  2530. L790:
  2531.     io__97.ciunit = status_1.iofile;
  2532.     s_wsfe(&io__97);
  2533.     e_wsfe();
  2534. /*<   791 format('0*error*:  subcircuit nodes missing'/) >*/
  2535. /*<       go to 40 >*/
  2536.     goto L40;
  2537.  
  2538. /*  .ends processing */
  2539.  
  2540. /*<   800 if (nsbckt.eq.0) go to 890 >*/
  2541. L800:
  2542.     if (tabinf_1.nsbckt == 0) {
  2543.     goto L890;
  2544.     }
  2545. /*<       iknt=1 >*/
  2546.     iknt = 1;
  2547. /*<       if (nodplc(icode+2).le.0) go to 820 >*/
  2548.     if (nodplc[tabinf_1.icode + 1] <= 0) {
  2549.     goto L820;
  2550.     }
  2551. /*<       anam=value(ifield+2) >*/
  2552.     anam = blank_1.value[tabinf_1.ifield + 1];
  2553. /*<       iknt=nsbckt >*/
  2554.     iknt = tabinf_1.nsbckt;
  2555. /*<   810 loc=nodplc(isbckt+iknt) >*/
  2556. L810:
  2557.     loc = nodplc[tabinf_1.isbckt + iknt - 1];
  2558. /*<       locv=nodplc(loc+1) >*/
  2559.     locv = nodplc[loc];
  2560. /*<       anams=value(locv) >*/
  2561.     anams = blank_1.value[locv - 1];
  2562. /*<       if (anam.eq.anams) go to 820 >*/
  2563.     if (anam == anams) {
  2564.     goto L820;
  2565.     }
  2566. /*<       iknt=iknt-1 >*/
  2567.     --iknt;
  2568. /*<       if (iknt.ne.0) go to 810 >*/
  2569.     if (iknt != 0) {
  2570.     goto L810;
  2571.     }
  2572. /*<       go to 880 >*/
  2573.     goto L880;
  2574. /*<   820 irel=nsbckt-iknt+1 >*/
  2575. L820:
  2576.     irel = tabinf_1.nsbckt - iknt + 1;
  2577. /*<       call relmem(isbckt,irel) >*/
  2578.     relmem_(&tabinf_1.isbckt, &irel);
  2579. /*<       nsbckt=nsbckt-irel >*/
  2580.     tabinf_1.nsbckt -= irel;
  2581. /*<       go to 50 >*/
  2582.     goto L50;
  2583. /*<   880 write (iofile,881) anam >*/
  2584. L880:
  2585.     io__100.ciunit = status_1.iofile;
  2586.     s_wsfe(&io__100);
  2587.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  2588.     e_wsfe();
  2589. /*<   881 format('0*error*:  unknown subcircuit name:  ',a8/) >*/
  2590. /*<       go to 40 >*/
  2591.     goto L40;
  2592. /*<   890 write (iofile,891) >*/
  2593. L890:
  2594.     io__101.ciunit = status_1.iofile;
  2595.     s_wsfe(&io__101);
  2596.     e_wsfe();
  2597. /*<   891 format('0warning:  no subcircuit definition known -- line ignored' >*/
  2598. /*<      1/) >*/
  2599. /*<       go to 50 >*/
  2600.     goto L50;
  2601.  
  2602. /*  subcircuit call */
  2603.  
  2604. /*<   900 call getm4(nodplc(loc+2),0) >*/
  2605. L900:
  2606.     getm4_(&nodplc[loc + 1], &c__0);
  2607. /*<       ifld=1 >*/
  2608.     ifld = 1;
  2609. /*<       iknt=0 >*/
  2610.     iknt = 0;
  2611. /*<   910 ifld=ifld+1 >*/
  2612. L910:
  2613.     ++ifld;
  2614. /*<       if (nodplc(icode+ifld).ne.0) go to 920 >*/
  2615.     if (nodplc[tabinf_1.icode + ifld - 1] != 0) {
  2616.     goto L920;
  2617.     }
  2618. /*<       call extmem(nodplc(loc+2),1) >*/
  2619.     extmem_(&nodplc[loc + 1], &c__1);
  2620. /*<       iknt=iknt+1 >*/
  2621.     ++iknt;
  2622. /*<       ispot=nodplc(loc+2)+iknt >*/
  2623.     ispot = nodplc[loc + 1] + iknt;
  2624. /*<       if (value(ifield+ifld).lt.0.0d0) go to 400 >*/
  2625.     if (blank_1.value[tabinf_1.ifield + ifld - 1] < 0.) {
  2626.     goto L400;
  2627.     }
  2628. /*<       nodplc(ispot)=value(ifield+ifld) >*/
  2629.     nodplc[ispot - 1] = (integer) blank_1.value[tabinf_1.ifield + ifld - 1];
  2630. /*<       go to 910 >*/
  2631.     goto L910;
  2632. /*<   920 if (iknt.eq.0) go to 410 >*/
  2633. L920:
  2634.     if (iknt == 0) {
  2635.     goto L410;
  2636.     }
  2637. /*<       if (nodplc(icode+ifld).ne.1) go to 990 >*/
  2638.     if (nodplc[tabinf_1.icode + ifld - 1] != 1) {
  2639.     goto L990;
  2640.     }
  2641. /*<       call extnam(value(ifield+ifld),nodplc(loc+3)) >*/
  2642.     extnam_(&blank_1.value[tabinf_1.ifield + ifld - 1], &nodplc[loc + 2]);
  2643. /*<       go to 50 >*/
  2644.     goto L50;
  2645. /*<   990 write (iofile,991) >*/
  2646. L990:
  2647.     io__102.ciunit = status_1.iofile;
  2648.     s_wsfe(&io__102);
  2649.     e_wsfe();
  2650. /*<   991 format('0*error*:  subcircuit name missing'/) >*/
  2651. /*<       go to 40 >*/
  2652.     goto L40;
  2653.  
  2654. /*  end */
  2655.  
  2656. /*<  5000 if (nsbckt.eq.0) go to 5010 >*/
  2657. L5000:
  2658.     if (tabinf_1.nsbckt == 0) {
  2659.     goto L5010;
  2660.     }
  2661. /*<       nsbckt=0 >*/
  2662.     tabinf_1.nsbckt = 0;
  2663. /*<       write (iofile,5001) >*/
  2664.     io__103.ciunit = status_1.iofile;
  2665.     s_wsfe(&io__103);
  2666.     e_wsfe();
  2667. /*<  5001 format('0*error*:  .ends  card missing'/) >*/
  2668. /*<       nogo=1 >*/
  2669.     flags_1.nogo = 1;
  2670. /*<  5010 call clrmem(ifield) >*/
  2671. L5010:
  2672.     clrmem_(&tabinf_1.ifield);
  2673. /*<       call clrmem(icode) >*/
  2674.     clrmem_(&tabinf_1.icode);
  2675. /*<       call clrmem(idelim) >*/
  2676.     clrmem_(&tabinf_1.idelim);
  2677. /*<       call clrmem(icolum) >*/
  2678.     clrmem_(&tabinf_1.icolum);
  2679. /*<       call clrmem(isbckt) >*/
  2680.     clrmem_(&tabinf_1.isbckt);
  2681. /*<       if (nfour.eq.0) call clrmem(ifour) >*/
  2682.     if (tabinf_1.nfour == 0) {
  2683.     clrmem_(&tabinf_1.ifour);
  2684.     }
  2685. /*<       if (nsens.eq.0) call clrmem(isens) >*/
  2686.     if (tabinf_1.nsens == 0) {
  2687.     clrmem_(&tabinf_1.isens);
  2688.     }
  2689. /*<  6000 call second(t2) >*/
  2690. L6000:
  2691.     second_(&t2);
  2692. /*<       rstats(1)=t2-t1 >*/
  2693.     miscel_1.rstats[0] = t2 - t1;
  2694. /*<       return >*/
  2695.     return 0;
  2696. /*<       end >*/
  2697. } /* readin_ */
  2698.  
  2699. #undef cvalue
  2700. #undef nodplc
  2701. #undef alsex
  2702. #undef alspu
  2703. #undef alsac
  2704. #undef aide
  2705. #undef aidc
  2706. #undef ampar
  2707. #undef aidm
  2708. #undef aper
  2709. #undef ablnk
  2710. #undef alstc
  2711. #undef area
  2712. #undef aic
  2713. #undef apoly
  2714. #undef titinp
  2715. #undef alssf
  2716. #undef alszx
  2717. #undef alsxqc
  2718. #undef alsrss
  2719. #undef alsrds
  2720. #undef alsps
  2721. #undef alspd
  2722. #undef alsad
  2723. #undef alsas
  2724. #undef alsw
  2725. #undef alsl
  2726. #undef alstd
  2727. #undef alsf
  2728. #undef alsnl
  2729. #undef alszo
  2730. #undef alsz0
  2731. #undef alspw
  2732. #undef alsdc
  2733. #undef alsoff
  2734. #undef alssi
  2735.  
  2736.  
  2737.